Created
March 29, 2015 21:54
-
-
Save maryrosecook/661a9ae72cc1cd4bedde 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": False} | |
def print_to_dos(to_dos): | |
for to_do in to_dos: | |
if to_dos[to_do] == False: | |
print("- %s" % to_do) | |
else: | |
print("x %s" % to_do) | |
def new_to_do(to_dos): | |
to_do = raw_input("What else do you need to do? ") | |
to_dos[to_do] = False | |
def complete_to_do(to_dos): | |
to_do = raw_input("What have you completed? ") | |
to_dos[to_do] = True | |
running = True | |
while (running): | |
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) | |
print_to_dos(to_dos) | |
elif action == "Print": | |
print_to_dos(to_dos) | |
elif action == "Quit": | |
running = False | |
print("Laters baby!") | |
else: | |
print("Does not compute.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment