-
-
Save cloneko/ebb97cd2544a3f32f502 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python3 | |
def isOdd(i): | |
return False if format(i,'b')[-1] == '0' else True | |
def isEven(i): | |
return not isOdd(i) | |
if __name__ == '__main__': | |
for x in range(100): | |
print(x, isEven(x)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment