Advertisement
teslariu

validar

Jun 10th, 2021
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #    
  4.  
  5. while True:
  6.     try:
  7.         numero = int(input("Ingrese un nro: "))
  8.     except Exception:
  9.         print("Error: no has ingresado un número")
  10.     else:
  11.         print(f"El numero es {numero}")
  12.         break
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement