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
The instructions in a program, when expressed in Python, ...
sergejj [24]

Answer:

can only be carried out by computers, as long as an interpreter is available which one is it?

Explanation:

The interperetor needed is called CPython, this is the standard C implementation of the language.

7 0
2 years ago
Select the correct answer from each drop-down menu.
lys-0071 [83]

Answer: A and C

Explanation:I did it before

6 0
3 years ago
This process can be applied to help workers choose the best telecommunications technology to do a specific task.
Lisa [10]
B. Internet Telephony would be my best guess. I'm not that good with computers. Hope this Helps :-)
4 0
3 years ago
Read 2 more answers
These are templates or patterns that make it easier for users to enter data
kupik [55]

Answer:

A piece of code

Explanation:

8 0
2 years ago
Who is familiar with Pixlr E.com on here????!!!!!
dsp73

meAnswer:

Explanation:

5 0
2 years ago
Other questions:
  • Which of the following is something that scientists often seek by using computer models and simulations?
    8·2 answers
  • How does a hard drive work?
    5·1 answer
  • Random access memory is the portion of a computer's primary storage that does not lose its contents when one switches off the po
    6·2 answers
  • Every brand of computer has its own binary language, called
    14·1 answer
  • Please describe in a few sentences
    14·1 answer
  • How did punch cards improve the weaving process?
    11·1 answer
  • Fern has set up a computer network for the entire building. Unfortunately, the signal strength diminishes as it reaches toward t
    8·1 answer
  • Some scientists say that robots my become self - aware in the near future Do you think this is possible?​
    10·1 answer
  • The memory used by the CPU to temporarily hold data while processing is called _______. random access memory central processing
    5·1 answer
  • OSI layer for HDLC??​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!