Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## This program computes the cost of breakfast at the Good Morning American! restaurant
- #
- ## CONSTANTS ##
- #
- EGG = 0.99
- BACON = 0.49
- SAUSAGE = 1.49
- HASHBROWN = 1.19
- TOAST = 0.79
- COFFEE = 1.09
- TEA = 0.89
- name = input("May I get your name? ") # Gets the user's name
- print("Good morning", name) # Greets the user because this program is for a restaurant
- print("Please choose from small breakfast, regular breakfast, big breakfast, egg, bacon, sausage, hash brown, toast, coffee, tea (press q to terminate): ")
- order = input("What would you like to have this morning? ").lower().strip()
- def formatInput(textLine) :
- textLine = textLine.lower().strip()
- wordList = textLine.split()
- textLine = " ".join(wordList)
- return textLine
- reply = input("Would you like anything else? ")
- while reply == "yes" or "y":
- if reply == ("no") or ("n"):
- break
- if order == ("egg"):
- quantity = int(input("How many would you like? "))
- if order == ("bacon"):
- quantity = int(input("How many would you like? "))
- if order == ("sausage"):
- quantity = int(input("How many would you like? "))
- if order == ("hashbrown"):
- quantity = int(input("How many would you like? "))
- if order == ("toast"):
- quantity = int(input("How many would you like? "))
- if order == ("coffee"):
- quantity = int(input("How many would you like? "))
- if order == ("tea"):
- quantity = int(input("How many would you like? "))
- if order == ("small breakfast"):
- print("The small breakfast includes one egg, one hash brown, two slices of toast, two strips of bacon, and one sausage")
- quantity = int(input("How many would you like? "))
- if order == ("regular breakfast"):
- print("The regular breakfast includes two eggs, one hash brown and two slices of toast, four strips of bacon, and two sausages")
- quantity = int(input("How many would you like? "))
- if order == ("big breakfast"):
- print("The big breakfast includes three eggs, two hash browns, four slices of toast, six strips of bacon, and three sausages ")
- quantity = int(input("How many would you like? "))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement