← Back to If Statements
Question 230
Enough To Pay
Enough To Pay
Read the price of an item and then the amount handed over, both whole dollars. When the amount is less than the price print Not enough money; otherwise print the change in the form Change: <amount> using an f-string. Input: two lines, the price then the amount paid, each an integer, no prompts. Output: one line.
Expected Output:
Not enough money= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
If Statements
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.