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]
3 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:
Pie3 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
Does kohl's sell homecoming dresses?? And if do you know what the price rage would be !!
SpyIntel [72]

Answer:

Yes, the prices are anywhere from $30-$100 dollars+tax

https://www.kohls.com/catalog/juniors-homecoming-dresses-clothing.jsp?CN=Gender:Juniors+Occasion:Homecoming+Category:Dresses+Department:Clothing

6 0
3 years ago
Which of the following are cloud computing resources?
aleksandr82 [10.1K]
All of the above because it is accessible through computer access if you were to download them to any type of iCloud work
3 0
3 years ago
Read 2 more answers
What type of security solution provides a hardware platform for the storage and management of encryption keys?
shutvik [7]

The type of security solution provides a hardware platform for the storage and management of encryption keys exists hardware security modules .

Hardware security modules (HSMs) supply an effective method to control encryption keys.

<h3>What are Hardware security modules?</h3>

A hardware security module (HSM) exists as a physical machine that supplies extra security for sensitive data. This kind of device exists utilized to require cryptographic keys for essential functions such as encryption, decryption, and authentication for the usage of applications, identities, and databases.

The hardware usually costs at least USD 20,000 to deploy, USD 40,000 for increased accessibility, and multiple periods better for normal enterprise deployment.

Hardware Security Modules (HSMs) exist in hardened, tamper-resistant hardware appliances that strengthen encryption techniques by developing keys, encrypting and decrypting data, and designing and demonstrating digital signatures.

A Hardware Security Module (HSM) exists as a hardware-based protection appliance that develops, stores, and protects cryptographic keys. Sterling Secure Proxy utilizes keys and certificates stored in its store or on an HSM.

To learn more about Hardware Security Module refer to:

brainly.com/question/24118720

#SPJ4

7 0
2 years ago
What is the correct syntax to take the first five characters from the cell and place to its right in cell A3?
olga nikolaevna [1]

Answer:

In cell A3 we type

=Right(A2,5)

Explanation:

The Right function in the Microsoft excel is placing the character or the string into the right position .Following are the syntax to using the right function in the excel sheet

=Right(cell name,num _of_character )

  • cell name-In this we have to specify the cell name
  • num_of_character -In this we have to specify the number of character we want the right of the cell name .

From the given question We have putting the string in the cell A2 and we have used the function in the cell A3 i.e

=Right(A2,5)

4 0
3 years ago
Write an algorithm and draw a flowchart to count the digits present in the given integer. ​
saul85 [17]

Answer:

The algorithm is as follows:

Input number  

count = 0

while(number not equal 0)

   number = number / 10

   count = count + 1

end

Print count

Explanation:

This gets input for the integer number

 Input number  

This initializes count of digits to 0

count = 0

The following loop is repeated while number is not 0

while(number not equal 0)

This performs integer division of the number by 10; the resulting division is saved in variable number

   number = number / 10

The count variable is incremented by 1

   count = count + 1

The loop ends here

end

This prints the count of integers

Print count

<em>See attachment for flowchart</em>

8 0
3 years ago
Other questions:
  • What range of leakage current must trip an IDCI?​
    15·1 answer
  • Technical colleges offer certification in audio engineering through programs that are normally from 2 to 6 months long. False Tr
    14·1 answer
  • Why does world of tanks keep downloading when I'm not even at the computer
    9·1 answer
  • When Russ opened a website on his browser, he saw an error that the site was not compatible with the browser version he was runn
    12·1 answer
  • Open IDLE. Create a new script file (File--&gt;New File, Ctrl n on Windows, Cmd n on macOS). On the first line, place your name
    6·1 answer
  • Write a program that prompts the user for the name of two files each containing a single line that represents a decimal integerc
    11·1 answer
  • Whats the best way to get into a computers programming to get past firewalls
    15·2 answers
  • You are tasked with designing an airplane that could carry a very large load of cargo. What type of airfoil would you use for th
    13·1 answer
  • How do IT Support professionals measure success? Choose all answers that apply. You will get credit for all answers that are cor
    12·1 answer
  • A network administrator has asked robin, a network engineer, to use ospf (open shortest path first) along with rip (routing info
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!