1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nadya68 [22]
2 years ago
13

The Fast as Light Shipping company charges the following rates. Weight of the item being sent Rate per 100 Miles shipped 2kg or

less. $0.25 Over than 2 kg but not more than 10 kg $0.30 Over 10 kg but not more than 20 kg. $0.45 Over 20 kg, but less than 50kg. $1.75 Write a program that asks for the weight of the package, and the distance to be sent. And then displays the charge.
Computers and Technology
1 answer:
Pie2 years ago
3 0

Answer:

weight = float(input("Enter the weight of the package: "))

distance = float(input("Enter the distance to be sent: "))

weight_charge = 0

if weight <= 2:

   weight_charge = 0.25

elif 2 < weight <= 10:

   weight_charge = 0.3

elif 10 < weight <= 20:

   weight_charge = 0.45

elif 20 < weight <= 50:

   weight_charge = 1.75

if int(distance / 100) == distance / 100:

  d = int(distance / 100)

else:

   d = int(distance / 100) + 1

   

total_charge = d * weight_charge

print("The charge is $", total_charge)

Explanation:

*The code is in Python.

Ask the user to enter the weight and distance

Check the weight to calculate the weight_cost for 100 miles. If it is smaller than or equal to 2, set the weight_charge as 0.25. If it is greater than 2 and smaller than or equal to 10, set the weight_charge as 0.3. If it is greater than 10 and smaller than or equal to 20, set the weight_charge as 0.45. If it is greater than 20 and smaller than or equal to 50, set the weight_charge as 1.75

Since those charges are per 100 miles, you need to consider the distance to find the total_charge. If the int(distance / 100) is equal to (distance / 100), you set the d as int(distance / 100). Otherwise, you set the d as int(distance / 100) + 1. For example, if the distance is 400 miles, you need to multiply the weight_charge by 4, int(400/100) = 4. However, if the distance is 410, you get the int(400/100) = 4, and then add 1 to the d for the extra 10 miles.

Calculate the total_charge, multiply d by weight_charge

Print the total_charge

You might be interested in
Aspiring graphic designers can earn a(n) certification for graphic design software, such as Photoshop and Acrobat.
kobusy [5.1K]

<u>Answer is:</u>

Yes, they earn a certification as a graphic designer


<u>Explanation:</u>

And they can do everything that graphic designer do, so that is why they earn a certification of a graphic designer such as Photoshop and adobe illustrator.

I hope you got the answer well. Thanks

5 0
3 years ago
Read 2 more answers
8. Ito ay paraan ng pagkuha ng kopya ng isang file mula sa isang website patungo sa file system. * 1 point A. Copyright B. Downl
shutvik [7]

Answer:

I ndd point

Explanation:

points*hahabbabbababbababba avgab abunjing abunjing beh

4 0
2 years ago
A term to describe articles that can be displayed in their entirety,as opposed to abstract and references only
babunello [35]

Answer:

Full Record - A screen containing complete or detailed citation information which may include a summary or abstract. Full Text - A term to describe articles that can be displayed in their entirety, as opposed to Abstract and References only.

Explanation:

5 0
3 years ago
An operating system that allows a single user to work on two or more programs at the same time is what type of OS?
Lisa [10]

Answer:

Explanation:

The correct answer is none of these

An operating system that allows a single user to perform only one task at a time is called a Single-User Single-Tasking Operating System. Functions like printing a document, downloading images, etc., can be performed only one at a time. Examples include MS-DOS, Palm OS, etc.

Advantage: This operating system occupies less space in memory.

Disadvantage: It can perform only a single task at a time.

There are four types of operating systems −

Real-time operating system

Single-User/Single-Tasking operating system

Single-User/Multitasking operating system

Multi-User/Multitasking operating system

Real-time operating system is designed to run real-time applications. It can be both single- and multi-tasking. Examples include Abbasi, AMX RTOS, etc.

An operating system that allows a single user to perform more than one task at a time is called Single-User Multitasking Operating System. Examples include Microsoft Windows and Macintosh OS.

It is an operating system that permits several users to utilize the programs that are concurrently running on a single network server. The single network server is termed as "Terminal server". "Terminal client" is a software that supports user sessions. Examples include UNIX, MVS, etc.

5 0
2 years ago
Help me please! (*18* points!)
miss Akunina [59]

Answer:

Databars and Sparkliness are key types of conditional formatting in excel.

Explanation:

Databars show the relative magnitude of values in a dataset. Sparkliness are tiny charts that reside in a cell in excel. These charts are used to show the trend over the time or variation in the dataset.

3 0
3 years ago
Other questions:
  • Which of the following is a list of input devices?
    13·2 answers
  • Which device or software application detects errors in system configurations?
    8·1 answer
  • 22 If you are involved in a violation and you do not have insurance to comply with the __________________, your driver license a
    9·2 answers
  • ANSWER ME PLS
    9·1 answer
  • Which finger presses the Shift key on the keyboard?
    6·2 answers
  • You have to cut a wood stick into pieces. The most affordable company, The Analog Cutting Machinery, Inc. (ACM), charges money a
    10·1 answer
  • Join my FNAF fan club discord
    6·2 answers
  • 3.6 Code Practice Edhesive. (PYTHON LANGUAGE)
    13·1 answer
  • outline 4 IDE features that makes software development much faster and more convenient than other alternatives.​
    9·1 answer
  • Which of the following terms refers to the cells that contain values and labels to be graphed in the chart?.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!