pizza-order.py 596 B

123456789101112131415161718192021222324252627282930313233
  1. print('Wellcome to Python Pizza Delivery')
  2. size = input('What size Pizza do you want? S, M or L ')
  3. add_pepperoni = input('Do you want pepperoni? Y or N ')
  4. extra_cheese = input('Do you want extra cheese? Y or N ')
  5. currency = "$"
  6. small = 15
  7. medium = 20
  8. large = 25
  9. pepperoni = [2, 3]
  10. cheese = 1
  11. bill = 0
  12. if size == "S":
  13. bill += small
  14. elif size == "M":
  15. bill += medium
  16. else:
  17. bill += large
  18. if add_pepperoni == "Y":
  19. if size == "S":
  20. bill += pepperoni[0]
  21. else:
  22. bill += pepperoni[1]
  23. if extra_cheese == "Y":
  24. bill += cheese
  25. print(f"Your final bill is: {bill}")