Advertisement
teslariu

ingresar

Dec 23rd, 2021
1,548
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. #  ingreso.py DEBEN ESTAR EN LA MISMA CARPETA
  5.  
  6. def ingresar_numero(n):
  7.     while True:
  8.         try:
  9.             numero = float(input(f"Ingrese un numero {n}: "))
  10.         except Exception:
  11.             print("Error: debe ingresar un número")
  12.         else:
  13.             return numero
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement