Skip to content

Instantly share code, notes, and snippets.

@dboyliao
Last active December 19, 2016 12:34
Show Gist options
  • Save dboyliao/10c92a2cdff802bf8e9a793477783253 to your computer and use it in GitHub Desktop.
Save dboyliao/10c92a2cdff802bf8e9a793477783253 to your computer and use it in GitHub Desktop.
def isPrime(n):
"""
naive prime number checker
return True if `n` is a prime number, False otherwise
"""
if n < 2:
return False
for i in range(2, n-1):
if n % i == 0:
return False
return True
# write your prime generator here
def genPrime(n):
yield None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment