Skip to content

Instantly share code, notes, and snippets.

@makoru-hikage
Created October 10, 2017 02:58
Show Gist options
  • Save makoru-hikage/7afd9d047baaf04e5eeeab00ad3365b3 to your computer and use it in GitHub Desktop.
Save makoru-hikage/7afd9d047baaf04e5eeeab00ad3365b3 to your computer and use it in GitHub Desktop.
A simple "IS PRIME?" algorithm made while being allergic to "else" statement
def is_prime(x):
divisor = 1
while divisor < x:
if divisor > 1 and (x % count) == 0:
return False
divisor += 1
return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment