Question: Python: num _ cheesecakes and dollar _ amount are read from input. A cheesecake costs 1 5 dollars. If num _ cheesecakes is less than
Python: numcheesecakes and dollaramount are read from input. A cheesecake costs dollars.
If numcheesecakes is less than then output 'Not enough cheesecakes.
If numcheesecakes is greater than or equal to then assign totalcost with the product of numcheesecakes and
If totalcost is less than or equal to dollaramount, then output 'Cheesecakes successfully purchased.
Otherwise, output 'Need more money to purchase all.
If dollaramount is greater than or equal to then output At least one item was purchased.
If numcheesecakes is greater than then output 'Restocking soon.
Ex : If the input is:
then the output is:
Not enough cheesecakes.
Ex : If the input is:
then the output is:
Cheesecakes successfully purchased.
At least one item was purchased.
Restocking soon.
Ex : If the input is:
then the output is:
Need more money to purchase all.
At least one item was purchased.
Restocking soon.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
