Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Collect Package Information: ( 5 points ) o Prompt the user to enter the weight of the package in pounds ( a positive float )

Collect Package Information: (5 points)
o Prompt the user to enter the weight of the package in pounds (a positive float).
o Prompt the user to enter the destination zone (an integer, 1,2, or 3, representing
different shipping zones). 2) Calculate Shipping Cost: (25 points) o Use multiple if, elif, and else statements to calculate the shipping cost based on the following rules: For Zone 1: $1.5 per pound.
For Zone 2: $2.0 per pound.
For Zone 3: $2.5 per pound.
Display an error message if the package weight is negative. Display an error message if the zone is not 1,2, or 3. 3) Display the Result: (5 points) o Print the calculated shipping cost in the format: "The shipping cost is $X.XX."

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

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions

Question

=+ Are unions company-wide, regional, or national?

Answered: 1 week ago

Question

=+j Explain the litigation risks in international labor relations.

Answered: 1 week ago

Question

=+j What rules will apply to the process of negotiations?

Answered: 1 week ago