IN THE STORY
Dustin tests a local model of a drone controller. In this fictional simulator, the approved commands are hover, land and return.
The idea
A list groups values. in asks whether a value occurs in a collection. append adds an item at the end of a list. Filtering builds a new list containing only items that meet a rule. Here the input is ordinary text, not radio traffic. This program controls no device and blocks no real transmission.
Your mission
Complete the condition so track and erase are excluded while the approved commands remain in their original order.
Replace ____ with the missing expression, then choose Run code. Match the expected output before trying your own changes.
Before you run it
What should the output be if every input command is disallowed?
A little help?
Hint 1: a nudge
Check each command against the supplied approved list.
Hint 2: a closer look
Use command in approved.
How the answer works
The result is a new list containing hover and land. Input, rule and output are visible. A real controller would require authentication and other safeguards; this is a model of one rule only.
This replaces the code in the editor. Save your version first if you want to keep it.
Make it yours
Add return and test again. Then try LAND in capitals and explain the result.