Crear una función para aplicar descuentos - Construye una función Apply Discount

Cuéntanos qué está pasando:

i dont understand why my code no pass this detection if is a bool,string print the text and works

Tu código hasta ahora

def apply_discount(price,discount):
 if not isinstance(price,(float,int)) or isinstance(price, bool):
  print("The price should be a number")
  return
 elif not isinstance(discount,(float,int)) or isinstance(discount, bool):
  print("The discount should be a number")
  return
 elif price <= 0:
  print("The price should be a greater than 0")
  return
 elif discount <= 0 or discount > 100:
  print("The discount should be between 0 and 100")
 return

 mount_discount = price * discount / 100
 total = price - mount_discount
 print(total,"y",mount_discount)
apply_discount(True,101)

Información de tu navegador:

El agente de usuario es: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36

Información del desafío:

Crear una función para aplicar descuentos - Construye una función Apply Discount

Enlace de GitHub: i18n-curriculum/curriculum/challenges/espanol/blocks/lab-discount-calculator/695774002591bbc5f8cf3e53.md at main · freeCodeCamp/i18n-curriculum · GitHub

Hola. La función debe devolver la cadena. Espero haberte ayudado.

hola lo probe en vs code cuando no es un numero y imprime los print pero me sale esto: Cuando se llama a apply_discount con un price (primer argumento) que no es un número (int o float), debería devolver The price should be a number. y no se que hice mal :C

notice “debería devolver” (which is “return”)

here you print but return nothing so the test fails