Created
September 18, 2017 01:49
-
-
Save dosjota/9dd65e2e1972a89d6fa7bcc8ad1fa077 to your computer and use it in GitHub Desktop.
60 números primos terminados en 7
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
numero = 0 | |
lista = [] | |
while len( lista ) <= 59: | |
numero += 1 | |
validar = 0 | |
if numero % 10 == 7: | |
for i in range( numero ): | |
i += 1 | |
if numero % i == 0: | |
validar += 1 | |
if validar > 2: | |
break | |
if validar == 2: | |
lista += [ numero ] | |
print( lista ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment