Tell us what’s happening:
can’t pass step. 6 (if discount is less then 0 but greater than 100 return…
Your code so far
def apply_discount(price, discount):
if not isinstance(price, (int, float)):
return 'The price should be a number'
if not isinstance(discount, (int, float)):
return 'The discount should be a number'
if price <= 0:
return 'The price should be greater than 0'
if discount <= 0 or discount >= 100:
return 'The price should be greater than 0'
Your browser information:
User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Challenge Information:
Build a Discount Calculator - Build a Discount Calculator