Last active
August 29, 2015 14:27
-
-
Save eldon/9a554f14c8d8d812a21f to your computer and use it in GitHub Desktop.
T-Prep 61A Bootcamp
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
| def find_gold(mine): | |
| """ | |
| >>> find_gold([]) | |
| >>> find_gold(["coal"]) | |
| . | |
| >>> find_gold(["gold"]) | |
| Yee haw! I'm rich! | |
| >>> find_gold([[]]) | |
| Digging. | |
| Going back. | |
| >>> find_gold(["coal", "coal", ["coal", "coal"], [[["coal"]]], ["coal", ["gold", "coal"]]]) | |
| . | |
| . | |
| Digging. | |
| . | |
| . | |
| Going back. | |
| Digging. | |
| Digging. | |
| Digging. | |
| . | |
| Going back. | |
| Going back. | |
| Going back. | |
| Digging. | |
| . | |
| Digging. | |
| Yee haw! I'm rich! | |
| . | |
| Going back. | |
| Going back. | |
| """ | |
| *** YOUR CODE HERE *** | |
| def sum_digits(num): | |
| """ | |
| >>> sum_digits(5) | |
| 5 | |
| >>> sum_digits(123) | |
| 6 | |
| """ | |
| *** YOUR CODE HERE *** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment