Skip to content

Instantly share code, notes, and snippets.

@maryrosecook
Created February 1, 2015 17:09
Show Gist options
  • Save maryrosecook/38cdaf42181bb5d9b675 to your computer and use it in GitHub Desktop.
Save maryrosecook/38cdaf42181bb5d9b675 to your computer and use it in GitHub Desktop.
to_dos = ["Haircut"]
def print_to_dos(to_dos):
for to_do in to_dos:
print("- %s" % to_do)
def new_to_do(to_dos):
to_do = raw_input("What else do you need to do? ")
to_dos.append(to_do)
def complete_to_do(to_dos):
print ("Oops still a work in progress!")
while (True):
action = raw_input("New item, completed item or print list? ")
if action == "New":
new_to_do(to_dos)
print_to_dos(to_dos)
elif action == "Completed":
complete_to_do(to_dos)
elif action == "Print":
print_to_dos(to_dos)
else:
print("Does not compute.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment