Understanding functions and test cases!

Can copy/paste code into this URL to try it out:
https://reeborg.ca/reeborg.html?lang=en&mode=python&menu=worlds%2Fmenus%2Freeborg_intro_en.json&name=Maze&url=worlds%2Ftutorial_en%2Fmaze1.json
Focuses:
- Defining and using functions
- While loops
- PEP8 Indentation styles (4 spaces)
- Spaces vs. Tabs
This commit is contained in:
Mueez Khan 2021-01-08 13:58:59 -05:00 committed by GitHub
parent da15b8f461
commit 88ad0f92ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

17
Day 6/reeborg-maze.py Normal file
View file

@ -0,0 +1,17 @@
def turn_right():
turn_left()
turn_left()
turn_left()
while front_is_clear():
move()
turn_left()
while not at_goal():
if right_is_clear():
turn_right()
move()
elif front_is_clear():
move()
else:
turn_left()