Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cont = 0
- lista = []
- while cont < 20:
- # revise usted si el numero es valido
- n1 = int(input("Ingrese un numero: "))
- lista.append(n1);
- cont += 1
- nRepetido = 0
- nRepeticiones = 0
- for x in lista:
- repeticiones = lista.count(x)
- if repeticiones > nRepeticiones:
- nRepeticiones = repeticiones
- nRepetido = x
- print("Numero que mas se repite: %s" % nRepetido)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement