wendy on Nostr: Really? Okay, here it is and give me some advice for improvement: from ...
Really? Okay, here it is and give me some advice for improvement:
from karel.stanfordkarel import *
def main():
turn_left()
move_to_wall()
for i in range(2):
turn_around()
for a in range(4):
put_beeper()
move()
put_beeper()
turn_left()
while left_is_clear():
move()
turn_left()
move()
put_beeper()
turn_right()
turn_left()
turn_around()
for i in range(5):
move()
turn_right()
move_to_wall()
turn_right()
turn_right()
....
for f in range(2):
move()
put_beeper()
turn_right()
for j in range(2):
move()
turn_right()
put_beeper()
move()
put_beeper()
while front_is_clear():
move_to_wall()
turn_right()
while front_is_clear():
move_to_wall()
turn_left()
def move_to_wall():
while front_is_clear():
move()
def turn_around():
for i in range(2):
turn_left()
def turn_right():
for i in range(3):
turn_left()
# don't change this code
if __name__ == '__main__':
main()
from karel.stanfordkarel import *
def main():
turn_left()
move_to_wall()
for i in range(2):
turn_around()
for a in range(4):
put_beeper()
move()
put_beeper()
turn_left()
while left_is_clear():
move()
turn_left()
move()
put_beeper()
turn_right()
turn_left()
turn_around()
for i in range(5):
move()
turn_right()
move_to_wall()
turn_right()
turn_right()
....
for f in range(2):
move()
put_beeper()
turn_right()
for j in range(2):
move()
turn_right()
put_beeper()
move()
put_beeper()
while front_is_clear():
move_to_wall()
turn_right()
while front_is_clear():
move_to_wall()
turn_left()
def move_to_wall():
while front_is_clear():
move()
def turn_around():
for i in range(2):
turn_left()
def turn_right():
for i in range(3):
turn_left()
# don't change this code
if __name__ == '__main__':
main()