Previous
If-Else Statements
6 / 6
Next
Capstone
Hint
Suppose you are developing a finance app to make recommendation about purchasing an item.
Take the following inputs:
price
: the price of the item (float).current_balance
: the amount of money in checking account (float).savingsMade
: whether or not the savings goal has been reached this period (y/n).essential
: whether or not the item is essential (y/n), e.g., rent or groceries.
The item purchase should be approved if the item is essential, regardless of balance. The item purchase should also be approved if the savings goal was already reached, and there is enough balance.
Print approved
or denied
based on whether a purchase is approved.
Help
Solve
Reset
Test results
Test result #
Expected output
Your output