try:
dia_hoy = int(input("Día actual del año (1-365): "))
dia_cumple = int(input("Día de tu cumpleaños en el año (1-365): "))
if dia_cumple >= dia_hoy:
dias_faltantes = dia_cumple - dia_hoy
else:
dias_faltantes = (365 - dia_hoy) + dia_cumple
print(f"Faltan {dias_faltantes} días para tu cumpleaños. ")
except ValueError:
print("Error: Ingresa solo números válidos entre 1 y 365.")
To embed this program on your website, copy the following code and paste it into your website's HTML: