-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPizza_Dilevery.py
49 lines (45 loc) · 1.06 KB
/
Pizza_Dilevery.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# 🚨 Don't change the code below 👇
print("Welcome to Python Pizza Deliveries!")
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 ")
# 🚨 Don't change the code above 👆
# Write your code below this line 👇
S_pizza = 15
M_pizza = 20
L_pizza = 25
S_pepo = 2
M_L_pepo = 3
E_cheese = 1
bill = 0
if (size == "S"):
bill += S_pizza
if (add_pepperoni == "Y"):
bill += S_pepo
else:
pass
if (extra_cheese == "Y"):
bill += E_cheese
else:
pass
elif (size == "M"):
bill += M_pizza
if (add_pepperoni == "Y"):
bill += M_L_pepo
else:
pass
if (extra_cheese == "Y"):
bill += E_cheese
else:
pass
else:
bill += L_pizza
if (add_pepperoni == "Y"):
bill += M_L_pepo
else:
pass
if (extra_cheese == "Y"):
bill += E_cheese
else:
pass
print(f"Your final bill is: ${bill}.")