Hi friends, Danny here.
this is my first week with python, i like it, its not easy but ill try
i was trying to make the assignement of sals shipping, en evrything went well, first you have to write a code for ground shipping, with a help from you guys i was managed to complete that area.
but in the second area the asked me to write a code for drone shipping.
i thaught i wrote my code good, cause the outcome has to be 6,75, but when i execute my code it gives me 18.
im struggeling for hours, but i dont know what to adjust to reach the outcome of 6,75.
could you friends please have a look for me?
this is the github code
and this is the code:
weight = 8.4 # Ground shipping if weight <= 2: price_per_pound = 1.50 if weight <= 6 : price_per_pound = 3.00 if weight <= 10 : price_per_pound = 4.00 else: price_per_pound = 4.75 print (price_per_pound * weight + 20) # Ground shipping Premium ground_shipping_premium = 125.00 print ("Ground Shipping premium " ,ground_shipping_premium) # Drone Shipping weight = 1.5 if weight <= 2: cost_of_drone = 4.50 if weight <= 6 : cost_of_drone= 9.00 if weight <= 10 : cost_of_drone= 12.00 else: cost_of_drone = 14.25 print (cost_of_drone * weight)
if i execute this i get 18, please tell me where i did go wrong.
happy easter my friends.
Greets Danny from the Netherlands