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
algol [13]
3 years ago
14

A cookie recipe calls for the following ingredients: • 1.5 cups of sugar • 1 cup of butter • 2.75 cups of flour The recipe produ

ces 48 cookies with this amount of ingredients. Write a program that asks the user how many cookies they want to make and then displays the number of cups of each ingredient needed for the specified number of cookies in the following format: You need 5 cups of sugar, 3 cups of butter, and 7 cups of flour.

Computers and Technology
1 answer:
True [87]3 years ago
4 0

The program that asks the user how many cookies they want to make and then displays the number of cups of each ingredient is corresponds to the ingredients mentioned above.

<h3>Further explanation</h3>

Python is a general-purpose programming language. We want to write a python program that asks the user how many cookies they want to make and then displays the number of cups of each ingredient.

48 cookies = 1.5 cups of sugar + 1 cup of butter + 2.75 cups of flour, so:

def main():

   cookies = float(input("How many cookies would you like to make?\n>"))

   sugar = (1.5 * cookies) / 48.0

   butter = cookies / 48

   flour = (2.75 * cookies) / 48

   print("To make ", cookies, " cookies, you will need:\n", \

         format(sugar, '.2f'), " cups of sugar\n", \

         format(butter, '.2f'), " cups of butter\n", \

         format(flour, '.2f'), " cups of flour", sep='')

   redoQuery()  

def redoQuery():

   yn = input("Would you like to check another batch size? (y/n)\n>")

   if yn == 'y':

       main()

   elif yn =='n':

       exit()

   else:

       print("Please enter only a lowercase \'y\' or lowercase \'n\'," \

             "then press enter")

       redoQuery()

main()

The run program is shown in the attachment below.

<h3>Learn more</h3>

1. Learn more about python https://brainly.in/question/8049240

 

<h3>Answer details</h3>

Grade:  9

Subject: Computers and Technology

Chapter:  programming with python

Keywords: python

You might be interested in
You decide to configure ntp on the router to get time ntp server with an ip address of 172.17.8.254 which commanda should you us
Morgarella [4.7K]
Telenet into the router, authenticate and type enable once the prompt is back type ntp server 172.17.8.254 do this on all routers.
4 0
3 years ago
Sami is creating a web page for her dog walking business. Which item will set the theme for her page? Background color Heading c
bazaltina [42]

Answer:

A Background color

Explanation:

7 0
3 years ago
Universal Containers has a sales team focused on renewals. They will use many of the same Opportunity fields as other teams, but
ololo11 [35]

Stage Selected Values in the Sales Processes

Explanation:

A system administrator is the individual responsible for maintaining, configuring, and managing computer systems efficiently, particularly multi-user machines like servers.

Defining opportunities which comprise the selling process appropriately is one of the main functions for any company using Sales-force to monitor the performance of its sales process.

The Opportunity Stage Sales-force model off - the-box standards also reflect not the vocabulary or process that sales people use in the company As a result, Sales-force companies frequently make three main mistakes when describing their selling terminology.

6 0
3 years ago
If you are going to develop a special computer, what would it be and explain it's purpose.​
Ann [662]

Answer:

It would be to figure out what cancers someone could exactly so no need for a biopsy

4 0
3 years ago
PLEASE HELP 15 POINTS Emma plans on building a dog house using an algorithm. What will be the final step of the process? a) crea
cupoosta [38]

Answer:

Most likely C

Explanation:

Blueprint is the plan so she makes it 1st.

Building the roof is after the deck.

The deck is after the blueprint.

After it's all done she looks at it and thinks about what went wrong at then end.

If there are no mistakes it's B.

Hope this answers your question :).

6 0
3 years ago
Other questions:
  • 2. Write the binary representation of number 1037.379 in IEEE 754 standard in single precision. Express the result in binary, oc
    7·1 answer
  • The icons to insert footnotes and endnotes in a document are located in the _____ tab.
    8·1 answer
  • It proceeds the statement causes execution of the current loop iteration to end and commence at the beginning of the next loop.
    10·1 answer
  • The system restore utility can be started from command line using what executable?
    11·1 answer
  • Which of the following is not given to a client computer when it is first installed on a TCP/IP network so that it has the appro
    9·1 answer
  • . A wireless ……..is a device used to resolvewireless network connectivity problems.
    8·1 answer
  • Write an algorithm and flowchart to calculate sum of two given numbers​
    13·1 answer
  • Suppose that a 2M x 16 main memory is built using 256kB x 8 RAM chips and memory is word addressable, how many RAM chips are nec
    6·1 answer
  • Edhesive 7.6 lesson practice python
    11·1 answer
  • A web-based program that uses artificial intelligence techniques to automate tasks such as searches is called
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!