Skip to content

Instantly share code, notes, and snippets.

/Cafe Secret

Created September 16, 2014 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/899cfd1a5b1d31aa040b to your computer and use it in GitHub Desktop.
Save anonymous/899cfd1a5b1d31aa040b to your computer and use it in GitHub Desktop.
The Python Cafe.py is my first "large" project involving Python code. I thought it would be fun to interact with a computer in a "real world" situation. When you type answers, make sure to capatalize your words.
print("Hello. Welcome to Python Cafe. I'd like to take your order")
menu = input("Would you like a menu? ")
food = ("?")
drink = ("?")
cost = ("?")
if menu =="No":
print("Well, you have to order somehow.")
exit()
if menu =="Yes":
print("Okay, here you go.")
print("Menu")
print("Pizza, Hamburger, Kenneth,")
print("Chicken Alfredo, Mac 'n' Cheese,")
food = input("What would you like to order? ")
if food =="Kenneth":
print("I'm sorry, but we don't serve to cannibals.")
exit()
else:
print("Okay, here's a drink menu.")
print("Drinks")
print("Iced tea, Lemonade, Cherry Coke,")
print("Beer, Water, Mountain Dew,")
drink = input("what drink do you want to order? ")
cost = input("and how much would you like to pay? $")
if cost=="0":
print("Nice try, but you have to pay money at the python cafe")
if cost=="?":
print(" ")
answer = ("?")
if cost > "0":
answer = input("So, is that what'd you like to order? ")
if answer =="Yes":
print("Great! Your food will be out in a few minutes! Here's a reciept")
print("Food ordered = " +food)
print("Drink ordered = " +drink)
print("Total cost = " +cost)
print("Thank you for eating at the python cafe! Have a nice day!")
if answer =="No":
print("Well, just say when you want to eat")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment