-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
79 lines (63 loc) · 2.14 KB
/
main.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import math
total_palettes = 0
total_main_cubic_meters = 0
total_glue = 0
total_bags = 0
total_main_glue = 0
total_glue_palettes = 0
total_all_palettes = 0
total_trucks = 0
total_bags_truck = 0
while True:
cubic_meters_input = input("Enter cubic meters (or 'finish' to exit): ")
if cubic_meters_input.lower() == 'finish':
break
size_input = input("Please enter the size: ")
if size_input.lower() == 'finish':
break
cubic_meters = int(cubic_meters_input)
size = int(size_input)
if size == 10 or size == 15:
palette = math.ceil(cubic_meters / 1.8)
main_cubic_meters = palette * 1.8
elif size == 20:
palette = math.ceil(cubic_meters / 1.92)
main_cubic_meters = palette * 1.92
else:
print("Your size is not correct")
continue
main_palette = int(palette)
print("Your palette is:", main_palette)
total_palettes += main_palette
print("Your main cubic meters is:", main_cubic_meters)
total_main_cubic_meters += main_cubic_meters
glue = main_cubic_meters * 20
print("Your glue is:", glue)
total_glue += glue
bag = math.ceil(glue / 30)
print("Your bag is:", bag)
total_bags += bag
main_glue = bag * 30
print("Your main glue is:", main_glue)
total_main_glue += main_glue
glue_palette = math.ceil(main_glue / 720)
print("Your glue palette is:", glue_palette)
total_glue_palettes += glue_palette
all_palette = main_palette + glue_palette
print("Your all palette is:", all_palette)
total_all_palettes += all_palette
truck = math.floor(cubic_meters / 18)
print("Your truck is:", truck)
total_trucks += truck
bag_truck = truck * 18
print("Your bag is:", bag_truck)
total_bags_truck += bag_truck
print("Total Palettes:", total_palettes)
print("Total Main Cubic Meters:", total_main_cubic_meters)
print("Total Glue:", total_glue)
print("Total Bags:", total_bags)
print("Total Main Glue:", total_main_glue)
print("Total Glue Palettes:", total_glue_palettes)
print("Total All Palettes:", total_all_palettes)
print("Total Trucks:", total_trucks)
print("Total Bags Truck:", total_bags_truck)