Advertisement
fenix15100

#Bucle simple para restrigir datos (numero entero/positivo/n

Oct 16th, 2014
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. #Bucle simple para restrigir datos (numero entero/positivo/negativo)
  2. while True:
  3.     x = int(input("Dame un numero:"))
  4.     if (x < 0):
  5.         break;
  6.     print x
  7. print 'Has introducido un nΓΊmero negativo.'
  8. print 'Haz salido del bucle.'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement