day 7 - didn't like it

This commit is contained in:
2025-06-15 00:10:07 +02:00
parent b77a308a84
commit 8c0b19bb6c
2 changed files with 56 additions and 15 deletions

View File

@ -10,20 +10,20 @@
# Either the test front_is_clear() or wall_in_front(), right_is_clear() or wall_on_right(), and at_goal().
# How to use a while loop and if/elif/else statements.
# It might be useful to know how to use the negation of a test (not in Python).
def turn_right():
turn_left()
turn_left()
turn_left()
# def turn_right():
# turn_left()
# turn_left()
# turn_left()
while front_is_clear():
move()
turn_left()
# while front_is_clear():
# move()
# turn_left()
while not at_goal():
if not wall_on_right():
turn_right()
move()
elif not wall_in_front():
move()
else:
turn_left()
# while not at_goal():
# if not wall_on_right():
# turn_right()
# move()
# elif not wall_in_front():
# move()
# else:
# turn_left()