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]
2 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]2 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
Is Filmora 9 or Final Cut Pro Better for personal use?
padilas [110]
Final Cut Pro is better for personal use
3 0
2 years ago
When using the BinarySearch() method of an array or list type, what value is returned when the element is not found? How can we
Step2247 [10]

Answer:

When the element is not found we return -1.

Explanation:

When we use binary search we use BinarySearch() method of an array or list type when the element is found we return the index of the element if found if the element is not found we return -1.

We can decode this value since it is less than 0 and the indexing of arrays and lists starts with 0 upto the size-1.So -1 index is not present in the array or list.We have to check if the index is < 0 then the element is not present in the array or list.

for ex:-

if(index<0)

{

    System.out.println("Element is not present in the array");

}

5 0
2 years ago
I need help please?!!!
PolarNik [594]

Answer:

Turn on the defroster. obv

Explanation:

7 0
3 years ago
Read 2 more answers
Why is it now difficult for computer technology to maintain the pace of
KatRina [158]

It now difficult for computer technology as manufacturing cannot keep up with overwhelming transistor demand.

<h3>What was Moore's Law ?</h3>

Moore's Law is the one that talks about the fact that the number of transistors on a microchip is one that often goes up about two years always, even if the cost of computers is reduced.

Based on the above, It now difficult for computer technology as manufacturing cannot keep up with overwhelming transistor demand.

Learn more about computer technology  from

brainly.com/question/24912812

#SPJ1

6 0
2 years ago
The shell that is used by default in linux is the _____ shell.
Alchen [17]
The shell that is used by default in Linux is the Bash shell.
6 0
3 years ago
Other questions:
  • Peak download rate for a 4g network is __________. select one:
    12·2 answers
  • This is a free point thing!! I am giving 100 points!! Anyone wanna talk!!!!
    11·2 answers
  • A food web is shown below. In this food web, energy is transferred directly from the to the
    11·1 answer
  • When were anonymous inner classes added to java?
    10·1 answer
  • What is the name of the contextual or specific tab that appears in page layout view when adding a header
    15·1 answer
  • 7. Which innovation in video games do you think has been most significant? Include at least one way that innovation affects the
    6·1 answer
  • printLarger is a method that accepts two int arguments and returns no value. Two int variables, sales1 and sales2, have already
    11·1 answer
  • In what ways can you modify the location of the neutral point?
    11·1 answer
  • For all programs, you should write a small amount of code and _______
    6·1 answer
  • Why is it essential for every person living in the 21st century to have a computer​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!