18 lines
374 B
Python
18 lines
374 B
Python
try:
|
|
numero_1 = int(input("ingrese un numero"))
|
|
numero_2= int(input("ingrese otro numero"))
|
|
|
|
division= numero_1 / numero_2
|
|
except ValueError:
|
|
print("ingrese un entero")
|
|
except ZeroDivisionError:
|
|
print("No se puede dividir por 0")
|
|
else:
|
|
print(f"la division es {division}")
|
|
finally:
|
|
print("el programa finalizó")
|
|
|
|
|
|
lista = [1,2,4]
|
|
|
|
print(lista[5]) |