-
Notifications
You must be signed in to change notification settings - Fork 387
/
Copy pathshipping.py
45 lines (33 loc) · 1.03 KB
/
shipping.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
# Sal's Shipping
# Sonny Li
weight = 80
# Ground Shipping 🚚
if weight <= 2:
cost_ground = weight * 1.5 + 20
elif weight <= 6:
cost_ground = weight * 3.00 + 20
elif weight <= 10:
cost_ground = weight * 4.00 + 20
else:
cost_ground = weight * 4.75 + 20
print("Ground Shipping $", cost_ground)
# Ground Shipping Premimum 🚚💨
cost_ground_premium = 125.00
print("Ground Shipping Premimium $", cost_ground_premium)
# Drone Shipping 🛸
if weight <= 2:
cost_drone = weight * 4.5
elif weight <= 6:
cost_drone = weight * 9.00
elif weight <= 10:
cost_drone = weight * 12.00
else:
cost_drone = weight * 14.25
print("Drone Shipping: $", cost_drone)
# Determine cheapest shipping method
if cost_ground < cost_ground_premium and cost_ground < cost_drone:
print("Ground Shipping is the cheapest: $", cost_ground)
elif cost_ground_premium < cost_ground and cost_ground_premium < cost_drone:
print("Ground Shipping Premium is the cheapest: $", cost_ground_premium)
else:
print("Drone Shipping is the cheapest: $", cost_drone)