Created
August 6, 2010 23:56
-
-
Save ManuelZ/512233 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def es_primo(numero): | |
for i in range(2, numero): | |
if numero%i == 0: | |
return False | |
return True | |
lista = [] | |
for i in range (2, 10000): | |
if es_primo(i): | |
lista.append(i) | |
if lista.__len__() == 20: | |
break | |
print lista |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment