-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpp.py
30 lines (24 loc) · 786 Bytes
/
pp.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
print("Welcome to Python Pizza Deliveries!")
size = input("What size pizza do you want? S, M or L: ")
pepperoni = input("Do you want pepperoni on your pizza? Y or N: ")
extra_cheese = input("Do you want extra cheese? Y or N: ")
# todo: work out how much they need to pay based on their size choice.
bill = 0
if size == "S":
bill += 15
elif size == "M":
bill += 20
elif size == "L":
bill += 25
else:
print("You have chosen an invalid size.")
# todo: work out how much to add to their bill based on their pepperoni choice.
if pepperoni == "Y":
if size == "S":
bill += 2
else:
bill += 3
# todo: work out their final amount based on whether if they want extra cheese.
if extra_cheese == "Y":
bill += 1
print(f"Your final bill is: ${bill}.")