Question: IN PYTHON 3: For this problem, you will write some code that checks the weight of a package and then determines the price of shipping

IN PYTHON 3:

For this problem, you will write some code that checks the weight of a package and then

determines the price of shipping based on the weight. The weight of the package will be

represented by a variable named package_weight, and the price of shipping is represented

by a variable named shipping_cost. If the package_weight is less than or equal to 5, the

shipping_cost should be 3; else if the package weight is greater than 5 or less than or equal

to 10, the shipping_cost should be 7, otherwise (if the package is even heavier) the

shipping_cost should be 15.

The first part of your code should look like the following example. Be sure to test your code

with different values of package_weight:

package_weight = 1

if package_weight <= 5:

shipping_cost = 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!