i am on the last part part 7 Great job! Now, test your function!
What is the cheapest method of shipping a 4.8 pound package and how much would it cost?
What is the cheapest method of shipping a 41.5 pound package and how much would it cost?
(See hint for answers)
I have 0 coding experience so i am going into this thing fresh and have made it this far in about 3 hours worth of time. I always try to watch the videos at the end of each of these and try to understand or find out what i am doing differently and or wrong. I am at the point now where i am wondering if these videos have been made with beginners in mind.
Here is my code from the last part of this exercise and it looks totally different then the video.
if ground_shipping(weight) < drone_shipping(weight) and ground_shipping(weight) < premium_ground_shipping:
return "Ground is the cheapest method with a cost of " + str(ground_shipping(weight)) elif premium_ground_shipping < drone_shipping(weight) and premium_ground_shipping < ground_shipping(weight): return "Premium is the cheapest method with a cost of " + str(premium_ground_shipping)
return “Drone is the cheapest method with a cost of $” + str(drone_shipping(weight))
and the videos code is in the hyperlink below.
My major question is should i take these videos with a grain of salt or should i try to follow along with them and understand why they are doing that or will that just come with time