Last active
February 13, 2016 19:10
-
-
Save chipoglesby/3fca169e3ca86c86aa01 to your computer and use it in GitHub Desktop.
Answer the door! A quick gist to show how a computer program would walk through the process of answering the door as if it were human.
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
def answer_door(): | |
print "The doorbell rings and you open the door" | |
print "Is this someone that you know?" | |
answer = raw_input("Answer Yes No or Sketchy.").lower() | |
if answer == "yes": | |
print "Hey friend! How's it going? It's so great to see you again!" | |
elif answer == "no": | |
print "Oh, hello I do not think we've met before. How can I help you?" | |
else: | |
print "It's probably a bill collector! Shut the door!" | |
answer_door() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment