python/clase_4/excep.py
2026-08-20 19:03:34 -03:00

12 lines
327 B
Python

try:
numero_1 = int(input("Ingrese un mumero "))
numero_2 = int(input("Ingrese otro numero "))
division= numero_1 / numero_2
except Exception as error:
print(f"Ocurrio un error: {type(error)}") #ValueError
else:
print(f"la division es { division}")
finally:
print("el proceso finalizó correctamente")