TORONTO KIDS COMPUTER CLUB | Aurora Tuesday 18:30 Python Homework 20.02.18.
17111
post-template-default,single,single-post,postid-17111,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Aurora Tuesday 18:30 Python Homework 20.02.18.

21 Feb Aurora Tuesday 18:30 Python Homework 20.02.18.

Question:
A store is having a sale. They’re giving 2 dollars off purchases of $10 or lower, and 3 dollars off purchases of greater than $10. However, there’s no discount if you purchase less than 5 dollars. Write a program that asks the purchase price and displays the final price.

Sample Input 1:
Price: 20

Sample Output 1:
The final price after discount is 17 dollars


Sample Input 2:
Price: 8

Sample Output 2:
The final price after discount is 6 dollars


Sample Input 3:
Price: 4

Sample Output 3:
The final price after discount is 4 dollars

No Comments

Sorry, the comment form is closed at this time.