Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Page 1 of 2 CIS 1 6 5 HW 2 : Shortbread Calculator 2 0 Points Shortbread. Who doesn t love it , and with
Page
of
CIS
HW: Shortbread Calculator
Points
Shortbread. Who doesnt love it and with just three ingredients, who couldnt make it And with
your help, this dense, buttery treat is about to get even easier.
Your Task
Code a Python Shortbread Calculator that will allow a user to customize a recipe size and
view nutritional information. A simple shortbread cookie recipe uses C butter, C sugar, and
C flour to make cookies. Your calculator will display custom ingredient amounts for any
number of cookies the user enters. For example, the following user is wanting to make a half recipe
of cookies of which they will eat User input is circled to differentiate it from output:
A recipe of cookies and eating will produce the following output:
Use the following data in your calculations:
Standard Shortbread Recipe Cookies
Butter Cup
Sugar Cup
Flour Cups
Nutritional Data Cookie
Calories
Carbs g
Fat g
You may approach this any way you like, but one way would be to begin your program by
calculating the ingredient portions for ONE cookie by dividing each of the original recipe portions
by and then multiply those results by the users desired number of cookies. The nutritional
data are already given per cookie, so that will be just straight multiplication.
Since decimal lengths will vary depending on recipe sizes, Ill advise you not to fiddle with
decimal formatting at all this program. Well have plenty of opportunities to use that technique
later.
When youre done, submit your py file or zipped py file as a zip through Canvas.
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