Created
February 1, 2015 17:09
-
-
Save maryrosecook/38cdaf42181bb5d9b675 to your computer and use it in GitHub Desktop.
This file contains 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
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