-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPizza.py
More file actions
161 lines (42 loc) · 1.99 KB
/
Copy pathPizza.py
File metadata and controls
161 lines (42 loc) · 1.99 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import math
pizza = print("""
PIZZA TYPE NUMBER OF SLICES PRICE PER BOX
-----------------|------------------------------|----------------------------------
1: SAPA SIZE | 5,000
| 8 |
-----------------|------------------------------|----------------------------------
2: SMALL MONEY 10 | 6,000
| |
-----------------|------------------------------|----------------------------------
3: YAHOO BOYS 16 | 15,000
| |
-----------------|------------------------------|---------------------------------
4: HUNGRY MAN SIZE 22 | 23,500
| |
-----------------|------------------------------|----------------------------------
""")
pizza = input("place ur order:"). upper()
match(pizza):
case "SAPA SIZE":
price = 5000
number_of_slices = 8
case "SMALL MONEY":
price = 6000
number_of_slices = 10
case "YAHOO BOYS":
price = 15000
number_of_slices = 16
case "HUNGRY MAN SIZE":
price = 23000
number_of_slices = 22
d
case _:
print("invalid input selected")
exit()
number_of_people = int(input("Enter number of people "))
number_of_box = math.ceil( number_of_people / number_of_slices)
slices_altogether = number_of_box * number_of_slices - number_of_people
total_prices_of_pizza = number_of_box * price
print(f"Number of boxes efficient for everyone is {number_of_box } boxes")
print(f"Number of slices remaining after partying is {slices_altogether } slices")
print(f"The price is ${total_prices_of_pizza } ")