Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Case Studies In Business Data Bases

Authors: James Bradley

1st Edition

0030141346, 978-0030141348

More Books

Students also viewed these Databases questions

Question

2. What kind of team is it?

Answered: 1 week ago

Question

2. Identify issues/causes for the apparent conflict.

Answered: 1 week ago