Last active
August 29, 2015 14:09
-
-
Save Guevarak1/8824b74ba97e62d50caa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #highest input should be 5 for testing | |
| def recursion(level): | |
| #accomidate for input params for move and turn | |
| level = level/10 | |
| #set these to level | |
| moveLev = level | |
| turnAng = level | |
| #if level is 1 then just do the small part of recursion | |
| if level <= 1: | |
| move(1,.1) | |
| turn(1,.1) | |
| #else start from the input level, move that length turn that angle and call recursion again with input level-1 | |
| #should repeat until we get to basecase. | |
| else: | |
| move(1,moveLen) | |
| turn(1,turnAng) | |
| #this should show that it turns those angles. for debugging only | |
| wait(5) | |
| recursion(level-1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment