Due Date
See the
calendar for due date.
Assignment:
A cookie recipe calls for the following ingredients:
- 1 cup of butter
- 3 cups of flour
- 8 cups of sugar
The recipe produces 84 cookies with this amount of ingredients. Write a program that asks the user how many cookies they want to make and then displays the number of cups of each ingredient needed for the specified number of cookies.
Example
The following examples are correct execution (with the text in bold being the input from the user):
Enter number of cookies needed: 84
You will need 1.0 cup of butter, 3.0 cups of flour, and 8.0 cups of sugar.
Enter number of cookies needed: 42
You will need 0.5 cup of butter, 1.5 cups of flour, and 4.0 cups of sugar.
After completing the program and testing the output for accuracy, make sure that you have a comment lines at the top of your file with your name, course and section, current date, and assignment description.
Submission
Submit your python script using the
handin program. For
handin, for this lab, type the following in a terminal window exactly as it appears:
handin pe1 pe1.py
To verify your submission, type the following in a terminal window:
handin pe1