Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.22 KB | None | 0 0
  1. orderCompleted = False
  2. orderCheck = False
  3. toppingsCompleted = False
  4. count = 0
  5. toppings = ""
  6.  
  7. print("------------------------------------ \n"
  8. "| Welcome to Piper's Pizza Shoppe! | \n"
  9. "------------------------------------")
  10.  
  11. if orderCompleted == False:
  12. size = int(input("Please select your size: \n"
  13. "1. Personal ($5.95) \n"
  14. "2. Medium ($7.75) \n"
  15. "3. Large($10.15) \n"
  16. "4. Extra-Large ($12.99) \n >"))
  17.  
  18. if size == 1:
  19. price = 5.95
  20. topping = input("Select your topping. \n"
  21. "You have 3 free topping, each additional topping after that will cost $0.55 \n"
  22. "Type any of the following and hit enter: \n"
  23. "pepperoni, mushrooms, onions, peppers, olives, bacon, sausage, pineapple, extra cheese \n"
  24. 'Type "done" to stop. ')
  25.  
  26. if toppingsCompleted == False:
  27. if topping == "done":
  28. toppingsCompleted = True
  29.  
  30. elif topping == "pepperoni" or topping == "mushrooms" or topping == "onions" or topping == "peppers" or topping == "olives" or topping == "bacon" or topping == "sausage" or topping == "pineapple" or topping == "extra cheese":
  31. toppings += topping
  32. count += 1
  33.  
  34. else:
  35. print("Sorry, " + topping + " is not an available topping")
  36.  
  37. if count > 3:
  38. toppingPrice = (count - 3) * 0.55
  39.  
  40. orderCompleted = True
  41.  
  42. elif size == 2:
  43. price = 7.75
  44. topping = input("Select your topping. \n"
  45. "You have 3 free topping, each additional topping after that will cost $0.75 \n"
  46. "Type any of the following and hit enter: \n"
  47. "pepperoni, mushrooms, onions, peppers, olives, bacon, sausage, pineapple, extra cheese \n"
  48. 'Type "done" to stop. ')
  49.  
  50. if toppingsCompleted == False:
  51. if topping == "done":
  52. toppingsCompleted = True
  53.  
  54. elif topping == "pepperoni" or topping == "mushrooms" or topping == "onions" or topping == "peppers" or topping == "olives" or topping == "bacon" or topping == "sausage" or topping == "pineapple" or topping == "extra cheese":
  55. toppings += topping
  56. count += 1
  57.  
  58. else:
  59. print("Sorry, " + topping + " is not an available topping")
  60.  
  61. if count > 3:
  62. toppingPrice = (count - 3) * 0.75
  63. price += toppingPrice
  64.  
  65. orderCompleted = True
  66.  
  67. elif size == 3:
  68. price = 10.15
  69. topping = input("Select your topping. \n"
  70. "You have 3 free topping, each additional topping after that will cost $1.25 \n"
  71. "Type any of the following and hit enter: \n"
  72. "pepperoni, mushrooms, onions, peppers, olives, bacon, sausage, pineapple, extra cheese \n"
  73. 'Type "done" to stop. ')
  74.  
  75. if toppingsCompleted == False:
  76. if topping == "done":
  77. toppingsCompleted = True
  78.  
  79. elif topping == "pepperoni" or topping == "mushrooms" or topping == "onions" or topping == "peppers" or topping == "olives" or topping == "bacon" or topping == "sausage" or topping == "pineapple" or topping == "extra cheese":
  80. toppings += topping
  81. count += 1
  82.  
  83. else:
  84. print("Sorry, " + topping + " is not an available topping")
  85.  
  86. if count > 3:
  87. toppingPrice = (count - 3) * 1.25
  88. price += toppingPrice
  89.  
  90. orderCompleted = True
  91.  
  92. elif size == 4:
  93. price = 12.99
  94. topping = input("Select your topping. \n"
  95. "You have 3 free topping, each additional topping after that will cost $1.75 \n"
  96. "Type any of the following and hit enter: \n"
  97. "pepperoni, mushrooms, onions, peppers, olives, bacon, sausage, pineapple, extra cheese \n"
  98. 'Type "done" to stop. ')
  99.  
  100. if toppingsCompleted == False:
  101. if topping == "done":
  102. toppingsCompleted = True
  103. price += toppingPrice
  104.  
  105. elif topping == "pepperoni" or topping == "mushrooms" or topping == "onions" or topping == "peppers" or topping == "olives" or topping == "bacon" or topping == "sausage" or topping == "pineapple" or topping == "extra cheese":
  106. toppings += topping
  107. count += 1
  108.  
  109. else:
  110. print("Sorry, " + topping + " is not an available topping")
  111.  
  112. if count > 3:
  113. toppingPrice = (count - 3) * 1.75
  114. price += toppingPrice
  115.  
  116.  
  117. orderCompleted = True
  118.  
  119.  
  120. else:
  121. print("I'm sorry," + str(size) + "is not a valid selection")
  122.  
  123. if size == 1:
  124. pizzaSize = "Personal pizza"
  125.  
  126. if size == 2:
  127. pizzaSize = "Medium pizza"
  128.  
  129. if size == 3:
  130. pizzaSize = "Large pizza"
  131.  
  132. if size == 4:
  133. pizzaSize = "Extra-Large pizza"
  134.  
  135. if orderCheck == False:
  136. correctOrder = input("Your order: \n"
  137. + pizzaSize + "\n "
  138. "Toppings:" + toppings + "\n"
  139. "Is this correct? (y/n) ")
  140.  
  141. if correctOrder == "y":
  142. print("------------------------- \n"
  143. "Subtotal: " + price + "\n"
  144. "Tax: " + price*0.13 + "\n"
  145. "------------------------- \n"
  146. "Total " + price*1.13 + "\n"
  147. "------------------------- \n\n"
  148. "Thanks for dining at Piper's Pizza Shoppe. \n"
  149. "Have a great day!")
  150. orderCheck = True
  151.  
  152. elif correctOrder == "n":
  153. print("Sorry for the confusion")
  154. exit()
  155.  
  156. else:
  157. print("Please answer 'y' or 'n'")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement