Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- orderCompleted = False
- orderCheck = False
- toppingsCompleted = False
- count = 0
- toppings = ""
- print("------------------------------------ \n"
- "| Welcome to Piper's Pizza Shoppe! | \n"
- "------------------------------------")
- if orderCompleted == False:
- size = int(input("Please select your size: \n"
- "1. Personal ($5.95) \n"
- "2. Medium ($7.75) \n"
- "3. Large($10.15) \n"
- "4. Extra-Large ($12.99) \n >"))
- if size == 1:
- price = 5.95
- topping = input("Select your topping. \n"
- "You have 3 free topping, each additional topping after that will cost $0.55 \n"
- "Type any of the following and hit enter: \n"
- "pepperoni, mushrooms, onions, peppers, olives, bacon, sausage, pineapple, extra cheese \n"
- 'Type "done" to stop. ')
- if toppingsCompleted == False:
- if topping == "done":
- toppingsCompleted = True
- 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":
- toppings += topping
- count += 1
- else:
- print("Sorry, " + topping + " is not an available topping")
- if count > 3:
- toppingPrice = (count - 3) * 0.55
- orderCompleted = True
- elif size == 2:
- price = 7.75
- topping = input("Select your topping. \n"
- "You have 3 free topping, each additional topping after that will cost $0.75 \n"
- "Type any of the following and hit enter: \n"
- "pepperoni, mushrooms, onions, peppers, olives, bacon, sausage, pineapple, extra cheese \n"
- 'Type "done" to stop. ')
- if toppingsCompleted == False:
- if topping == "done":
- toppingsCompleted = True
- 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":
- toppings += topping
- count += 1
- else:
- print("Sorry, " + topping + " is not an available topping")
- if count > 3:
- toppingPrice = (count - 3) * 0.75
- price += toppingPrice
- orderCompleted = True
- elif size == 3:
- price = 10.15
- topping = input("Select your topping. \n"
- "You have 3 free topping, each additional topping after that will cost $1.25 \n"
- "Type any of the following and hit enter: \n"
- "pepperoni, mushrooms, onions, peppers, olives, bacon, sausage, pineapple, extra cheese \n"
- 'Type "done" to stop. ')
- if toppingsCompleted == False:
- if topping == "done":
- toppingsCompleted = True
- 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":
- toppings += topping
- count += 1
- else:
- print("Sorry, " + topping + " is not an available topping")
- if count > 3:
- toppingPrice = (count - 3) * 1.25
- price += toppingPrice
- orderCompleted = True
- elif size == 4:
- price = 12.99
- topping = input("Select your topping. \n"
- "You have 3 free topping, each additional topping after that will cost $1.75 \n"
- "Type any of the following and hit enter: \n"
- "pepperoni, mushrooms, onions, peppers, olives, bacon, sausage, pineapple, extra cheese \n"
- 'Type "done" to stop. ')
- if toppingsCompleted == False:
- if topping == "done":
- toppingsCompleted = True
- price += toppingPrice
- 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":
- toppings += topping
- count += 1
- else:
- print("Sorry, " + topping + " is not an available topping")
- if count > 3:
- toppingPrice = (count - 3) * 1.75
- price += toppingPrice
- orderCompleted = True
- else:
- print("I'm sorry," + str(size) + "is not a valid selection")
- if size == 1:
- pizzaSize = "Personal pizza"
- if size == 2:
- pizzaSize = "Medium pizza"
- if size == 3:
- pizzaSize = "Large pizza"
- if size == 4:
- pizzaSize = "Extra-Large pizza"
- if orderCheck == False:
- correctOrder = input("Your order: \n"
- + pizzaSize + "\n "
- "Toppings:" + toppings + "\n"
- "Is this correct? (y/n) ")
- if correctOrder == "y":
- print("------------------------- \n"
- "Subtotal: " + price + "\n"
- "Tax: " + price*0.13 + "\n"
- "------------------------- \n"
- "Total " + price*1.13 + "\n"
- "------------------------- \n\n"
- "Thanks for dining at Piper's Pizza Shoppe. \n"
- "Have a great day!")
- orderCheck = True
- elif correctOrder == "n":
- print("Sorry for the confusion")
- exit()
- else:
- print("Please answer 'y' or 'n'")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement