Advertisement
JUNIORCEDE1

Untitled

Jul 10th, 2021
839
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. respuesta = 'si'
  2. numeros = []
  3.  
  4. while(respuesta == 'si'):
  5.     numS = input('ingrese un numero\n')
  6.     numero = int(numS)
  7.     exist_count = numeros.count(numero)
  8.     if exist_count > 0:
  9.         print("no se permiten numeros repetidos")
  10.     else:
  11.         numeros.append(numero)
  12.         respuesta = input('Desea continuar? si/no\n')
  13.    
  14.  
  15. numeros.sort()
  16. contador = 0
  17. print('los numeros ingresados son: ')
  18. while(contador < len(numeros)):
  19.     print(numeros[contador])
  20.     contador += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement