Build a Discount Calculator - Build a Discount Calculator

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

Welcome to the forum @tedevelynmosby

To help you debug, add these print calls after the function:

print(apply_discount(200, 50))
print(apply_discount(50, 0))

Happy coding