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
How many wires are in a standard Cat 6 cable?
Lynna [10]
I believe it is 8

Hope this helps
5 0
2 years ago
Read 2 more answers
How is a microprocessor different from an integrated circuit?
pychu [463]

Answer:

Explanation:

Microprocessors are faster, smaller and less expensive than integrated circuits. ... Microprocessors control the flow of electrons and integrated circuits control the flow of protons.

6 0
2 years ago
Which feature is an element of OPSEC?
Romashka [77]

Answer:

B

Explanation:

B because:

OPSEC protects critical information and not attempt to protect unclassified ones. Its purpose is to bring about the reduction in the vulnerabilities of the U.S. and various multinational forces from all sorts of positive enemy exploitation of the information which is of serious nature and very important.

6 0
3 years ago
What is the value of this expression?
Ahat [919]

Answer:

C. 4

Explanation:

typedef enum{

       red,orange,yellow,green,blue

}

color_t;

defines an enumeration type color_t with the values red,orange,yellow,green,blue.

If we print out the values of these individual elements they will be as follows:

red : 0

orange : 1

yellow: 2

green: 3

blue: 4

Note that the integer values are dependent on the position in the definition.

6 0
3 years ago
What is the main scientific weakness in watson and crick's paper?
cestrela7 [59]
When writing a scientific paper, it's ethical to refer to those who helped you in your paper and to cite all the references you used in order to give credits to the owners of these references.

In Watson and Crick's paper, they did not refer to those who assisted them in their research neither gave them credit. This is somehow considered as stealing someone's work and referring it to yourself.
This was the major scientific error in their paper.
3 0
3 years ago
Read 2 more answers
Other questions:
  • What should the timing of transition slides be per minute?
    9·2 answers
  • Online library catalogs can direct you to your closest library. (1 point)<br> True<br> False
    8·1 answer
  • In the windows firewall, any rules preceded by a __________ checkmark have not been enabled. black gray green red
    13·1 answer
  • What are some reasons DNS is necessary? Check all that apply. A. It maps local addresses to simple names without editing hosts f
    7·1 answer
  • Matthew is working to select an authentication method for his company that will support REST as well as many web-based and mobil
    12·1 answer
  • You will be creating a program that implements the Observer design pattern. This design pattern is utilized in almost all GUI sy
    10·1 answer
  • ✨Why is among us so addictive I try to play one game but end up playing over 20✨
    15·2 answers
  • Did anyone do 5.7.5 Factorial on Code HS??<br><br><br><br> 20 POINTS
    9·1 answer
  • How are comments in a Java program treated by the compiler?
    14·2 answers
  • What function is used to return the results in column D?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!