Discounts

Report a typo

Imagine you are at the stationery store. You want to buy a cheap pencil, so you are looking for discounts. You have found some price labels. The first one is the standard price, the second one is a reduced price. You want to buy a pencil if the discount is more than 50%.

Write a function called discounts() that takes two prices, the standard one and the discounted one. If the discount is more than 50%, return the message: "I will buy it!". If it is less, use the assert keyword.

You do not need to take any input or call the function yourself.

Write a program in Python 3
def discounts(x, y):
...
___

Create a free account to access the full topic