Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a Python program named CST _ 1 5 0 _ Ingredient _ Adjuster. py - Define variables for the original amounts of ingredients as
Create a Python program named CSTIngredientAdjuster. pyDefine variables for the original amounts of ingredients as follows:
sugarpercookie cups of sugar per cookie
butterpercookie cup of butter per cookie
flourper cookie cups of flour per cookie
In the main part of your program:
a Prompt the user to enter the number of cookies he or she wants to make and store it in a variable, eg numcookies.
b Calculate the adjusted amounts of ingredients for the specified number of cookies using the following formulas:
totalsugar numcookies sugarpercookie
o total butter num
cookies butterper cookie
total flour numcookies flourpercookie
Display the results using print statements as follows.
a Print the number of cookies the user wants to make.
b Print the adjusted amount of sugar needed for the specified number of cookies.
c Print the adjusted amount of butter needed for the specified number of cookies.
d Print the adjusted amount of flour needed for the specified number of cookies.
Save and run your program to see the adjusted ingredient amounts.
Sample Output:
Number of Cookies: XXX
Adjusted Amount of Sugar: XXX cups
Adjusted Amount of Butter: XXX cups
Adjusted Amount of Flour: XXX cups
Note: Replace XXX with the actual values.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started