Cuéntanos qué está pasando:
Hola estoy atorada en este tema, algún consejo? pls
Tu código hasta el momento
def apply_discount (price, discount):
if not insinstance(price,(int,float)):
return "The price should be a number"
if not insinstance(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 discount should be between 0 and 100"
discount_amt= price * (discount / 100)
final_price = price - discount_amt
return "final price"
Información de tu navegador:
El agente de usuario es: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Información del Desafío:
Build an Apply Discount Function - Construye una función Apply Discount