Trace a path across a room.

Robot vacuum cleaners move across a room automatically collecting dust and small debris. At a very basic level their navigation traces a straight line path, turning when they detect the end of the room.

Vacuum cleaner

⭐⭐

Make

Write a program to trace across a virtual room on the turtle canvas. First by moving out of a docking station by 20 pixels, turning right and moving 4 meters (100 pixels). Once the end of the room is reached the robot moves up 20 pixels before turning left and moving across the room 4 meters. It needs to do this 5 times to cover the whole room. It does not need to return to the docking station (although this is a nice extension).

Success Criteria

Remember to add a comment before a subprogram to explain its purpose.

Complete the subprogram called vacuum that:

  1. Draws the path of the vacuum cleaner shown below.

Typical inputs and outputs from the program would be:

Restricted automated feedback

Automated feedback for this assignment is still under construction. Submitted programs are checked for syntax errors and their source code is checked for potential errors, bugs, stylistic issues, and suspicious constructs. However, no checks are performed yet to see if the program correctly implements the behaviour specified in the assignment.