Vacuum cleaner
Sign in to test your solution.
# Vacuum cleaner program
# -------------------------
# Import libraries
# -------------------------
import turtle
# -------------------------
# Subprograms
# -------------------------
# Initialise
def reset():
turtle.pensize(10)
turtle.left(90)
# Navigate room
def vacuum():
turtle.forward(20)
turtle.right(90)
turtle.forward(100)
# -------------------------
# Main program
# -------------------------
reset()
vacuum()
turtle.done()
You can submit as many times as you like. Only your latest submission will be taken into account.
Sign in to test your solution.
Python sandbox
This window allows you to run Python code without installing a thing. The code you write here is not automatically submitted to Dodona.