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
Romashka [77]
3 years ago
7

2. In many jurisdictions a small deposit is added to containers to encourage people to recycle them. In one particular jurisdict

ion, containers holding one litre or less have a $0.10 deposit, and containers holding more than one litre have a $0.25 deposit. Write a Python script that reads the number of containers of each size from the user. The script should compute and display the refund that will be received for returning those containers. Format the output so that it includes a dollar sign and displays exactly two decimal places.

Computers and Technology
1 answer:
RUDIKE [14]3 years ago
5 0

Answer:

Here is the Python program:

small_container = int(input("Enter the number of small containers you recycled?"))

large_container = int(input("Enter the number of large containers you recycled?"))

refund = (small_container * 0.10) + (large_container * 0.25)

print("The total refund for returning the containers is $" + "{0:.2f}".format(float(refund)))

Explanation:

The program first prompts the user to enter the number of small containers. The input value is stored in an integer type variable small_container. The input is basically an integer value.

The program then prompts the user to enter the number of large containers. The input value is stored in an integer type variable large_container. The input is basically an integer value.

refund = (small_container * 0.10) + (large_container * 0.25)  This statement computers the refund that will be recieved for returning the small and larger containers. The small containers holding one litre or less have a $0.10 deposit so the number of small containers is multiplied by 0.10. The large containers holding more than one litre have a $0.25 deposit so the number of large containers is multiplied by 0.25. Now both of these calculated deposits of containers of each side are added to return the refund that will be received for returning these containers. This whole computation is stored in refund variable.

print("The total refund for returning the containers is $" + "{0:.2f}".format(float(refund))) This print statement displays the refund in the format given in the question. The output includes a $ sign and displays exactly two decimal places by using {0:.2f} where .2f means 2 decimal places after the decimal point. Then the output is represented in floating point number using. format(float) is used to specify the output type as float to display a floating point refund value up to 2 decimal places.

You might be interested in
When creating a firewall exception, what is the difference between opening a port and allowing an application through?
Mnenie [13.5K]
Every application has access to specific opened port. If you only make a exception for the specific application only that application can bypass the firewall.
6 0
3 years ago
A mobile device you are troubleshooting is experiencing a sharp decrease in performance after an hour of operation. The user pow
Anna71 [15]

Answer:

Close or disable all unused running apps.

Explanation:

Closing programs running in the background on your computer or mobile device helps to free up system resources for your other programs. These problems can be resolved where your system is running slowly or two programs are trying to use the same device hence causing the device or system to drag.

5 0
3 years ago
Ou have an application running on Oracle Cloud Infrastructure. You identified that the read and write operations are slowing you
Otrada [13]

Answer:

Options A and C.

Explanation:

In Oracle Cloud Infrastructure the two options which allows you to increase disk performance are;

1. Terminate the compute instance preserving the boot volume. Create a new compute instance using a VM Dense IO shape using the boot volume preserved.

2. Create a backup of the boot volume. Create a new compute instance a VM Dense IO shape and restore the backup.

3 0
3 years ago
BIOS has two jobs. One is to boot up, or start, the computer. What is the other? Maintain the computer’s software firewall. Ensu
Levart [38]

Answer:

Provide the basic interface for the hardware.

Explanation:

3 0
3 years ago
What does the metric column in a routing table do?
Verdich [7]

Answer:

 The metric column basically indicate the cost of the route in the routing table and also decide correct route in the routing table.

In the routing table, the lowest metric route is more preferable route as compared to others. In the networking, the routing table is basically used to store the data or information in the form of table in the router.

In the computer network, the routes are listed for the particular destination in which the routes are basically associate that particular routes.

4 0
3 years ago
Other questions:
  • What is the minimum number of data points you should usually have to look for signs of improvement on a run chart?
    8·1 answer
  • After you have created at least four slides, a scroll bar containing scroll arrows and scroll boxes will appear on the right edg
    9·1 answer
  • Jim wants to buy a car, but he’ll probably only need it for a couple of years. He has a short commute to work, so he won’t be pu
    5·1 answer
  • Given a matrix input_matrix, return a Numpy array that consists of every entry of A that has: an even row index in the range [0,
    9·1 answer
  • What output is generated by this for loop?
    6·1 answer
  • Ask the user to input an integer. Print out the next three consecutive numbers.
    12·1 answer
  • Anyone have an answer for 4.9 lesson code practice
    9·1 answer
  • It needs to be as simple as possible. Each question is slightly different.1. An arithmetic progression is a sequence of numbers
    7·1 answer
  • AJ created a list, and he needs all of the numbers to be in order. Which Python function will allow him to organize his list num
    5·2 answers
  • Direction: Read each item carefully and choose the letter of the correct answer. Write your answers on a separate sheet of paper
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!