subject

PLEASE HELP! LANGUAGE IS PYTHON Question: How to calculate Shipping Charges?
The Fast Freight Shipping Company charges the following rates:

Weight of Package

Rate per 500 miles Shipped

2 pounds or less

$1.10

Over 2 pounds but not more than 6 pounds

$2.20

Over 6 pounds but not more than 10 pounds

$3.70

Over 10 pounds

$3.80

The shipping charges per 500 miles are not prorated, which means that we don't divide the shipping charges in the above table by 500 to get the shipping charge per mile. For example, if a 2.5-pound package shipped 550 miles, the charges would be $4.40.

Design an algorithm and write a Python program to ask the user to enter the weight of the package, the number of miles shipped, then calculate and display the shipping charges.

Assignment Example:
Weight 1.7 pounds, miles 430 miles, total shipping charges: 1.10
Weight 1.7 pounds, miles 775 miles, total shipping charges: 2.20 ( 1.10 * 2). The key point here is how to get the 2 in the multiplication
Weight 1.7 pounds, miles 1234 miles, total shipping charges: 3.30 (1.10 * 3).
Weight 8 pounds, miles 6290 miles, total shipping charges: 3.70 * 13 = 48.10
Problem Analysis:
2 input: the weight, the miles (both could be decimal values)
Based on the weight, you can use a if-else if decision structure to check which shipping rate you use in the calculation (use the shipping rate in the table)
based on the miles the packages shipped, you calculate how many 500 miles the package is shipped. It determines the number times the shipping rate need to multiple. Sometimes you need to round it up to the next integer, sometime not. You need to figure out when the miles/500 should be rounded up to the next integer, and when it should not.
The program will display the total shipping charges for the package.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:20
Write a program called assignment3 (saved in a file assignment3.java) that computes the greatest common divisor of two given integers. one of the oldest numerical algorithms was described by the greek mathematician, euclid, in 300 b.c. it is a simple but very e↵ective algorithm that computes the greatest common divisor of two given integers. for instance, given integers 24 and 18, the greatest common divisor is 6, because 6 is the largest integer that divides evenly into both 24 and 18. we will denote the greatest common divisor of x and y as gcd(x, y). the algorithm is based on the clever idea that the gcd(x, y) = gcd(x ! y, y) if x > = y and gcd(x, y) = gcd(x, y ! x) if x < y. the algorithm consists of a series of steps (loop iterations) where the “larger” integer is replaced by the di↵erence of the larger and smaller integer. this continues until the two values are equal. that is then the gcd.
Answers: 3
question
Computers and Technology, 22.06.2019 22:30
You are new to microsoft certification and want to start out by getting a certification geared around windows 8. what microsoft certification should you pursue?
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
Under the home tab, where can a user find options to change the bullet style of an outline? in the slides group in the font group in the paragraph group in the drawing group
Answers: 1
question
Computers and Technology, 24.06.2019 12:30
Select all that apply. what two keys listed below should you use to enter data in an excel worksheet? tab backspace enter right arrow
Answers: 2
You know the right answer?
PLEASE HELP! LANGUAGE IS PYTHON Question: How to calculate Shipping Charges?
The Fast Freigh...
Questions
question
Chemistry, 02.08.2019 14:30
Questions on the website: 13722363