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
what is internet ?? mention five ways one can use the internet profitably. state five disadvantages of the internet.​
rosijanka [135]

The Internet can be best described as network of networks since it connects over 50 million computer worldwide.

3 0
3 years ago
How many features are there in the team​
sdas [7]

Answer:

<h3><u>Component Team</u></h3>
  • Leads to 'invented' work and a Forever-Growing Organization
  • Dependencies between teams leads to additional planning
<h3><u>Feature Team</u></h3>
  • Leads to customer focus,visibility and smaller organization
  • Minimizes dependencies between teams and increase flexibility

4 0
2 years ago
________ is the extent to which differences in observed scale scores reflect true differences among objects on the characteristi
AysviL [449]

Answer: Validity

Explanation:Validity is the type of claim that is made towards the measuring of reliability of any element. The differences appearing in the measurement of the elements displays the validly factor is not up to the mark which indirectly implies that reliability is not high. Validity is the situation in which all the parameters appearing in the element is perfect. If validity is perfect then only perfect reliability is achieved.

7 0
3 years ago
When media is used to communicate with a very large audience, it is referred to as media.
Sophie [7]

Answer:

mass media

Explanation:

6 0
2 years ago
Read 2 more answers
In Java please,
Bogdan [553]

Answer:

  1. import java.util.Scanner;
  2. public class Main {
  3.    public static void main(String[] args) {
  4.        Scanner input = new Scanner(System.in);
  5.        System.out.print("Enter meal total: $");
  6.        double meal = input.nextDouble();
  7.        double finalAmount = meal + meal *0.09;
  8.        if(finalAmount * 0.15 > 8){
  9.            finalAmount = finalAmount + 8;
  10.        }else{
  11.            finalAmount = finalAmount + finalAmount * 0.15;
  12.        }
  13.        System.out.println("Final amount: $" + finalAmount);
  14.    }
  15. }

Explanation:

Firstly, create a Scanner object and print user to input total meal (Line 5-7). Next, add the 9% tax to the meal total (Line 8). Use an if statement to check if the finalAmount multiplied by the 15% of tips is bigger than 8 (Line 10), if so, only add 8 to the final amount (Line 11). If not, add 15% tips to final amount (Line 12). At last, print out the final amount (Line 15).

8 0
2 years ago
Other questions:
  • _____ is an information-analysis tool that involves the automated discovery of patterns and relationships in a data warehouse.
    12·1 answer
  • A ___________ is the smallest unit in a written language.
    7·2 answers
  • What programs and outher things could i use to start a youtube gameing chanel
    6·1 answer
  • Word can store a maximum of how many documents in its Recent Documents area? five ten fifteen twenty
    8·1 answer
  • There are 3 parts to an osha inspection. What are they
    9·1 answer
  • What is a algorithm design ​
    11·1 answer
  • Jonathan is in the process of creating a photo of a fluttering flag with cars moving around in the background. He wants the flag
    13·2 answers
  • After you log in to PowerPoint Online, what is the first thing you need to do to start creating a presentation?
    12·2 answers
  • PLSS HELP ASAP ILL GIVE BRAINLIES THANKS
    7·2 answers
  • Which service works in conjunction with EC2 Autoscaling in order to provide predictive scaling based on daily and weekly trends
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!