27 Feb Aurora Saturday 16:30 Python Homework 20.02.22.
A store is having a sale. If the customer purchased 10 dollars or more, the store will give $2 off. Please write a program to ask how much the customer has bought. The program will show the discount and the final price the customer has to pay.
Use input() function to show the question prompt “Price: ” then wait for your answer.
Use print() function to show “You got $2 discount and your final price is …” if you enter the answer from the input is 10 or above. Otherwise, it will show “You did not get any discount and your price is …”
Sample Input 1:
Sample Output 1:
You got $2 discount and your final price is 18
Sample Input 2:
Sample Output 2:
You did not get any discount and your price is 8