the code outputs ‘The price should be a number’ when the price is a string. But the tests still arent being checked even though the code does exactly what the test is asking for. Is there something i am missing? Help appreciated, thanks.
Your code so far
def apply_discount(price,discount):
if not isinstance(price, (int, float)):
print("The price 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/151.0.0.0 Safari/537.36
Challenge Information:
Build an Apply Discount Function - Build an Apply Discount Function