You will program the decision a robot vacuum makes at each proximity reading, then follow a whole run.
Your tasks.
action, return "turn" when the distance is less than too_close, and "forward" otherwise.moves with the action for each reading, in order.turns to the number of "turn" actions.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…