Save the Ducks
Run
Pause
Stop
Speed
Ducks saved:
0
/
6
Simple Python Editor
# Write plain Python. # Example strategy: while True: if is_duck(): save_duck() if detect_wall(): turn_right() else: move_forward()
Available Functions
move_forward()
→ move the robot one step ahead
turn_left()
,
turn_right()
→ rotate the robot
is_duck()
→
True
if a duck is in front
save_duck()
→ rescue the duck in front
detect_wall()
→
True
if a wall is in front
Console Output