Computers and Technology

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.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 20:00, jc624826
What side length would you specify if you were required to create a regular hexagonal plate that was composed of 33 cm(squared) of sheet metal? dimension the side length to 0.1 cm
Answers: 2
image
Computers and Technology, 22.06.2019 21:30, Nathaliasmiles
The graph shows median weekly earnings for full-time workers according to education level. which can you not conclude?
Answers: 2
image
Computers and Technology, 22.06.2019 22:10, Metlife
Asequential circuit contains a register of four flip-flops. initially a binary number n (0000 ≤ n ≤ 1100) is stored in the flip-flops. after a single clock pulse is applied to the circuit, the register should contain n + 0011. in other words, the function of the sequential circuit is to add 3 to the contents of a 4-bit register. design and implement this circuit using j-k flip-flops.
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, ranmmm
The place where the extended axis of the earth would touch the celestial sphere is called the celestial
Answers: 1
Do you know the correct answer?
PLEASE HELP! LANGUAGE IS PYTHON Question: How to calculate Shipping Charges?
The Fast Freigh...

Questions in other subjects: