Advertisement
JkSoftware

Day 3 - Pizza Order Challenge

Nov 5th, 2021
1,018
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #  Don't change the code below
  2. print("Welcome to Python Pizza Deliveries!")
  3. size = input("What size pizza do you want? S, M, or L ")
  4. add_pepperoni = input("Do you want pepperoni? Y or N ")
  5. extra_cheese = input("Do you want extra cheese? Y or N ")
  6. #  Don't change the code above
  7.  
  8. #Write your code below this line 👇
  9. small_pizza = 15
  10. medium_pizza = 20
  11. large_pizza = 25
  12. pepperoni = 3
  13. xcheese = 1
  14. total = 0
  15.  
  16. if extra_cheese == "Y":
  17.     total += xcheese
  18.  
  19. if size == "S":
  20.     total += small_pizza
  21.     pepperoni = 2
  22. if size == "M":
  23.     total += medium_pizza
  24. if size == "L":
  25.     total += large_pizza
  26. if add_pepperoni == "Y":
  27.     total += pepperoni
  28.  
  29. print(
  30.     f"Your total will be ${total}"
  31. )
  32.  
  33.  
  34.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement