So i have been trying to solve the rain2.wld file in the cs1robots module. here is the code that i have so far:
from cs1robots import *
load_world("rain2")
h = Robot(avenue=3, street=6, orientation='S', beepers=10)
h.set_trace("blue")
h.set_pause(0.3)
h.drop_beeper()
h.move()
while not h.on_beeper():
if h.right_is_clear():
h.drop_beeper()
h.move()
elif h.front_is_clear():
h.move()
elif h.left_is_clear():
h.turn_left()
so basically i wanted it to check for every “window” and place a beeper there. but this is not doing it.
any help would be very appreciated