Answered step by step
Verified Expert Solution
Link Copied!

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 CST_150_Ingredient_Adjuster. py-Define variables for the original amounts of ingredients as follows:
sugar_per_cookie =1.5/48(cups of sugar per cookie)
butter_per_cookie =1/48(cup of butter per cookie)
flour_per_ cookie =2.75/48(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, e.g. num_cookies.
b. Calculate the adjusted amounts of ingredients for the specified number of cookies using the following formulas:
total_sugar = num_cookies * sugar_per_cookie
o total butter = num
_cookies * butter_per_ cookie
total flour = num_cookies * flour_per_cookie
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

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

Step: 3

blur-text-image

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

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

Students also viewed these Databases questions

Question

a. What is the banks return on assets? LOP8

Answered: 1 week ago