Advertisement
Guest User

Untitled

a guest
Sep 21st, 2019
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.17 KB | None | 0 0
  1. ## This program computes the cost of breakfast at the Good Morning American! restaurant
  2. #
  3. ## CONSTANTS ##
  4. #
  5. EGG = 0.99
  6. BACON = 0.49
  7. SAUSAGE = 1.49
  8. HASHBROWN = 1.19
  9. TOAST = 0.79
  10. COFFEE = 1.09
  11. TEA = 0.89
  12.  
  13. name = input("May I get your name? ")  # Gets the user's name
  14.  
  15. print("Good morning", name) # Greets the user because this program is for a restaurant
  16. print("Please choose from small breakfast, regular breakfast, big breakfast, egg, bacon, sausage, hash brown, toast, coffee, tea (press q to terminate): ")
  17. order = input("What would you like to have this morning? ").lower().strip()
  18.  
  19. def formatInput(textLine) :
  20.  textLine = textLine.lower().strip()
  21.  wordList = textLine.split()
  22.  textLine = " ".join(wordList)
  23.  return textLine
  24.  
  25. reply = input("Would you like anything else? ")
  26.  
  27. while reply == "yes" or "y":
  28.     if reply == ("no") or ("n"):
  29.         break
  30.  
  31.     if order == ("egg"):
  32.         quantity = int(input("How many would you like? "))
  33.  
  34.     if order == ("bacon"):
  35.         quantity = int(input("How many would you like? "))
  36.  
  37.     if order == ("sausage"):
  38.         quantity = int(input("How many would you like? "))
  39.  
  40.     if order == ("hashbrown"):
  41.         quantity = int(input("How many would you like? "))
  42.  
  43.     if order == ("toast"):
  44.         quantity = int(input("How many would you like? "))
  45.  
  46.     if order == ("coffee"):
  47.         quantity = int(input("How many would you like? "))
  48.  
  49.     if order == ("tea"):
  50.         quantity = int(input("How many would you like? "))
  51.  
  52.     if order == ("small breakfast"):
  53.         print("The small breakfast includes one egg, one hash brown, two slices of toast, two strips of bacon, and one sausage")
  54.         quantity = int(input("How many would you like? "))
  55.  
  56.     if order == ("regular breakfast"):
  57.         print("The regular breakfast includes two eggs, one hash brown and two slices of toast, four strips of bacon, and two sausages")
  58.         quantity = int(input("How many would you like? "))
  59.  
  60.     if order == ("big breakfast"):
  61.         print("The big breakfast includes three eggs, two hash browns, four slices of toast, six strips of bacon, and three sausages ")
  62.         quantity = int(input("How many would you like? "))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement