Created
October 10, 2017 02:58
-
-
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
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
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