Tell us what’s happening:
I tried to check for if the discount is a number or not, but the box doesn’t get checked. Instead, I checked the 9th box.. What’s the problem here?
Your code so far
def apply_discount(price, discount):
if type(price) == int or type(price) == float:
return(price)
else:
return('The price should be a number')
if type(discount) == int or type(discount) == float:
return(discount)
else:
return('The discount should be a number')
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Challenge Information:
Build a Discount Calculator - Build a Discount Calculator