Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Systems For Physicians And Medical Professionals How To Use And Access Databases

Authors: Harley Bjelland

1st Edition

1878487442, 9781878487445

More Books

Students also viewed these Databases questions