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
vesna_86 [32]
3 years ago
10

A milk carton can hold 3.78 liters of milk. Each morning, a dairy farm ships cartons of milk to a local grocery store. The cost

of producing one liter of milk and the profit of each carton of milk vary from farm to farm. Write a program that prompts the user to enter: The total amount of milk produced in the morning. The cost of producing one liter of milk. The profit on each carton of milk. The program then outputs: The number of milk cartons needed to hold milk. Round your answer to the nearest integer. The cost of producing milk. The profit for producing milk.
Computers and Technology
1 answer:
makvit [3.9K]3 years ago
3 0

Answer:

milk_produced = float(input("Enter the total amount of milk produced in the morning: "))

liter_cost = float(input("Enter the cost of producing one liter of milk: "))

carton_profit = float(input("Enter the profit on each carton of milk: "))

carton_needed = round(milk_produced / 3.78)

cost = milk_produced * liter_cost

profit = carton_profit * carton_needed

print("The number of milk cartons needed to hold milk is " + str(carton_needed))

print("The cost of producing milk is " + str(cost))

print("The profit for producing milk is " + str(profit))

Explanation:

*The code is in Python.

Ask the user to enter milk_produced, liter_cost and carton_profit

Calculate the number of milk cartons needed, divide the milk_produced by the capacity (3.78) of a cartoon and round the result

Calculate the cost, multiply the milk_produced by liter_cost

Calculate the profit, multiply the carton_profit by carton_needed

Print the results

You might be interested in
Public class Bird
Anna007 [38]

Answer:

Answer below.

Explanation:

You are creating an object of bird "b" with a talon strength of 5 and a beak of 5.

public Hawk(int talon, int beak)

{

super(beak);

talonStrength = talon;

}

Please mark brainliest if this is the answer you were looking for

Please mark brainliest if this is the answer you were looking for

6 0
3 years ago
The analysts at Techno Info Systems are considering the four-model approach to system development for a new client. If they make
Natali [406]

Answer:

Option B is correct.

Explanation:

Within Techno Info Systems the user has been analyst contemplating that four-model concept towards computer development for such its new customer. When they adopt that four-model method, thus the result seems to be the time taken to implement the rises in the method.

So, therefore the other options are incorrect according to the following scenario.

4 0
3 years ago
How do you insert a table by using standard toolbar?​
MissTica

Answer:

Click the Insert Table button on the Standard Toolbar. Drag over the grid that appears to select the number of rows and columns you want. To use automatic formatting, choose Table AutoFormat from the Table menu. Select several Formats from the menu on the left to see how the table will look.

5 0
3 years ago
What part of speech is contend
Amiraneli [1.4K]
Assuming the context, it would be considered a verb.

ie: "She contended to me that I was not acting maturely." 
7 0
3 years ago
Suppose that TCP's current estimated values for the round trip time (estimatedRTT) and deviation in the RTT (DevRTT) are 400 mse
Masja [62]

Answer:

617.5 msecs, 580.89 msecs, 582.36 msecs

Explanation:

Lets look at the following formulas:

EstimatedRTT = α * SampleRTT+(1- α) * EstimatedRTT

DevRTT = β * | SampleRTT- EstimatedRTT|+(1- β)* DevRTT

TimeoutInterval = EstimatedRTT +4* DevRTT

Given values are:

EstimatedRTT = 400 msec

DevRTT = 25 msec

α = 0.125

β = 0.25

After the first RTT estimate: (210)

EstimatedRTT = 0.125 * 210 + (1 - 0.125) * 400 = 376.25 msecs

DevRTT = 0.25 * |210 - 376.25| + (1 - 0.25) * 25 = 60.3125 msecs

TimeoutInterval = 376.25 + 4 * 60.3125 = 617.5 msecs

After the second RTT estimate: (400)

EstimatedRTT = 0.125 * 400 + (1 - 0.125) * 376.25 = 379.218 msecs

DevRTT = 0.25 * |400 - 379.218| + (1 - 0.25) * 60.3125 = 50.42 msecs

TimeoutInterval = 379.218 + 4 * 50.42 = 580.89 msecs

After the third RTT estimate: (310)

EstimatedRTT = 0.125 * 310 + (1 - 0.125) * 379.218 = 370.56 msecs

DevRTT = 0.25 * |310 - 370.56| + (1 - 0.25) * 50.42 = 52.95 msecs

TimeoutInterval = 370.56 + 4 * 52.95 = 582.36 msecs

5 0
3 years ago
Other questions:
  • Describe the Say It, Cover It, Resay It method.
    14·2 answers
  • An attribute whose value uniquely identifies an object is called a(n) _______.​
    15·1 answer
  • Provide Java code to illustrate how to create an array, reference an array, and address an element of an array.
    13·1 answer
  • In your own words, describe what Internet Protocols are. Why is it important to have agreed upon protocols?
    6·1 answer
  • A hard disk is a _ storage device
    11·2 answers
  • sara has just started using the Internet. She would like to be more efficient . In 3-4, give sara some advice about how to be mo
    5·1 answer
  • Which procedure is recommended when cleaning inside a computer? Clean the hard drive heads with a cotton swab. Hold the CPU fan
    9·1 answer
  • How many passes will it take to find the five in this list?
    6·2 answers
  • Define the term hardwar<br><br>​
    9·2 answers
  • Here is the model I’m working on and can’t figure it out this model shows the basic process of making a protein what are the str
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!