Question: Objectives: . Practice basic data types, expressions, and basic 1/0. A cookie recipe calls for the following ingredients: . 1.5 cups of sugar 1 cup

 Objectives: . Practice basic data types, expressions, and basic 1/0. A
cookie recipe calls for the following ingredients: . 1.5 cups of sugar

Objectives: . Practice basic data types, expressions, and basic 1/0. A cookie recipe calls for the following ingredients: . 1.5 cups of sugar 1 cup of butter 2.75 cups of flour The recipe produces 48 cookies with these amounts of the ingredients. Write a program that asks the user how many cookies he or she wants to make, and then displays the number of cups of each ingredient needed for the specified number of cookies. A possible sample run: Enter the number of cookies: 192 To make 192 cookies, you will need: 6.0 cups of sugar 4.0 cups of butter 11.0 cups of flour You might want to use the following template as your starting point: # A program to compute the number of cups of each ingredient needed for # the user-specified number of cookies, given a recipe. # Named constants for the original recipe. COOKIES_RECIPE = 48 # Number of cookies SUGAR RECIPE = 1.5 # Cups of sugar BUTTER RECIPE = 1.0 #Cups of butter FLOUR_RECIPE = 2.75 # Cups of flour # Prompt users for the desired number of cookies # TODO: save the entered number of cookies into an integer variable # Calculate the needed cups of sugar, butter, and flour # TODO: save the computed results into separate variables # Display the results for needed ingredient amounts # TODO: print desired report lines Name your program as L08_IngredientAdjuster. Compress your folder for submit. Submission: . The name of submitted file thus must be L08_IngredientAdjuster.py

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!