Skip to content

Instantly share code, notes, and snippets.

@eldon
Last active August 29, 2015 14:27
Show Gist options
  • Select an option

  • Save eldon/9a554f14c8d8d812a21f to your computer and use it in GitHub Desktop.

Select an option

Save eldon/9a554f14c8d8d812a21f to your computer and use it in GitHub Desktop.
T-Prep 61A Bootcamp
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