Skip to content

Instantly share code, notes, and snippets.

@Echocage
Created February 17, 2015 08:40
Show Gist options
  • Select an option

  • Save Echocage/65ac39b31c8e39844aeb to your computer and use it in GitHub Desktop.

Select an option

Save Echocage/65ac39b31c8e39844aeb to your computer and use it in GitHub Desktop.
def is_prime(number):
for x in range(2, number):
if number % x == 0:
return False
return True
for n in range(1, 101):
if is_prime(n):
print(n, 'is prime')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment