123456789101112131415161718192021222324252627282930313233 |
- print('Wellcome to Python Pizza Delivery')
- size = input('What size Pizza do you want? S, M or L ')
- add_pepperoni = input('Do you want pepperoni? Y or N ')
- extra_cheese = input('Do you want extra cheese? Y or N ')
- currency = "$"
- small = 15
- medium = 20
- large = 25
- pepperoni = [2, 3]
- cheese = 1
- bill = 0
- if size == "S":
- bill += small
- elif size == "M":
- bill += medium
- else:
- bill += large
- if add_pepperoni == "Y":
- if size == "S":
- bill += pepperoni[0]
- else:
- bill += pepperoni[1]
- if extra_cheese == "Y":
- bill += cheese
- print(f"Your final bill is: {bill}")
|