Why doesn’t anything get printed to the console when I use the code below?
It’s for the “Learn Python 3” “Sals Shipping” project
premium_ground_ship = 125.00
def normal_ground_ship(weight):
if weight >= 10:
return (weight * 4.00) + 20
elif weight >= 6:
return (weight * 4.00) + 20
elif weight >= 2:
return (weight * 4.00) + 20
else:
return (weight * 4.00) + 20
def drone_ship(weight):
if weight >= 10:
return weight * 14.25
elif weight >= 6:
return weight * 12.00
elif weight >= 2:
return weight * 9.00
else:
return weight * 4.50
def cheapest_price(weight):
ground = normal_ground_ship(weight)
premium = premium_ground_ship
drone = drone_ship(weight)
if ground < premium and ground < drone:
cost = ground
method = "normal ground shipping"
elif premium < ground and premium < drone:
cost = premium_ground_ship
method = "premium ground shipping"
else:
cost = drone_ship
method = "drone shipping"
print(
"The cheapest shipping method is " + method + " and it will cost you $ " + cost + "."
)
cheapest_price(4.8)
cheapest_price(41.5)
P.S I dont know if this tag is right