Skip to content

Commit 1792897

Browse files
authored
Add files via upload
1 parent 1e8b2a3 commit 1792897

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

exercise-6-pizza.py

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
"""
2+
WAP for pizza ordering where price for
3+
small pizza - 100 Rs
4+
medium pizza - 200 Rs
5+
large pizza - 300 Rs
6+
7+
Paneer toppings for small pizza - 30 Rs
8+
Paneer toppings for medium or large pizza - 50 Rs
9+
10+
Extra cheese top toppings for any size - 20 Rs
11+
"""
12+
13+
print()
14+
print("Welcome to Patsey's Pizza store!")
15+
print()
16+
17+
size = input("Choose the pizza size you want to order (Small, Medium or Large) : ")
18+
bill_amount = 0
19+
print()
20+
21+
if size == "small" or size == "Small" or size == "S" or size == "s" or size == "SMALL":
22+
bill_amount = 100
23+
print(f"Small-sized pizza cost {bill_amount} Rs without toppings!")
24+
elif size == "medium" or size == "Medium" or size == "MEDIUM" or size == "M" or size == "m":
25+
bill_amount = 200
26+
print(f"Medium-sized pizza cost {bill_amount} Rs without toppings!")
27+
else:
28+
bill_amount = 300
29+
print(f"Large-sized pizza cost {bill_amount} Rs without toppings!")
30+
31+
print()
32+
paneer_toppings = input("Do you want paneer toppings to your pizza? (Yes/No)")
33+
print()
34+
if paneer_toppings == "Yes" or paneer_toppings == "yes" or paneer_toppings == "Y" or paneer_toppings == "y":
35+
if size == "small" or size == "Small" or size == "S" or size == "s" or size == "SMALL":
36+
bill_amount += 30
37+
print("Paneer toppings on small-sized pizza charges 30 Rs.")
38+
print(f"Small-sized pizza cost {bill_amount} Rs on paneer toppings!!")
39+
elif size == "medium" or size == "Medium" or size == "MEDIUM" or size == "M" or size == "m":
40+
bill_amount += 50
41+
print("Paneer toppings on medium-sized pizza charges 50 Rs.")
42+
print(f"Medium-sized pizza cost {bill_amount} Rs on paneer toppings!!")
43+
else:
44+
bill_amount += 50
45+
print("Paneer toppings on large-sized pizza charges 50 Rs.")
46+
print(f"Large-sized pizza cost {bill_amount} Rs on paneer toppings!!")
47+
48+
print()
49+
extra_cheese = input("Do you wish having extra-cheese to your pizza?").lower()
50+
if extra_cheese in ["yes", "y"]:
51+
bill_amount += 20
52+
print("Extra-cheese add-on to your pizza charges 20 Rs.")
53+
54+
print()
55+
print("---------TOTAL BILL--------")
56+
print(f"Total amount to be paid for your pizza is {bill_amount} Rs")
57+
print("Thanks for ordering Pizza from us, we bake with love exclusively for you!")
58+
print()

0 commit comments

Comments
 (0)