Python quick start · Robot club · about 10 min
The two lines at the top, drive, wait, stop, print, and the rule that stops the robot on its own.
[1 mark]What does connect() do?
[1 mark]What does forward(50) do on its own?
[1 mark]This program has no stop(). What does the robot do?
from bugbot import * connect() forward(60) wait(1.5)
[1 mark]Put these lines in order to drive forward for two seconds, stop, and then say so.
Number the lines 1 to 6 to put them in the right order.
connect()wait(2)from bugbot import *forward(50)print("done")stop()[1 mark]What does this program print?
print("drove for", 2, "seconds")[1 mark]Which of these make BugBot move across the mat?
Tick every answer that is true.
forward(60)right(60)led("green")backward(60)print(position())[1 mark]You drive forward for 1 second and back for 1 second. Why does position() not say exactly (0, 0)?
Drive from the start into the green zone and stop inside it, using forward, wait and stop.
If it stops short, wait longer or drive faster.
from bugbot import * connect() forward(50) wait(1) stop()
Plan your program here, then type it in and press Run.
right() or left().position() before and after the drive, and work out how far 1 second at speed 50 takes you.