Skip to content

Instantly share code, notes, and snippets.

@dosjota
Created September 18, 2017 01:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dosjota/9dd65e2e1972a89d6fa7bcc8ad1fa077 to your computer and use it in GitHub Desktop.
Save dosjota/9dd65e2e1972a89d6fa7bcc8ad1fa077 to your computer and use it in GitHub Desktop.
60 números primos terminados en 7
#!/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