Skip to content

Instantly share code, notes, and snippets.

@cloneko
Forked from typosone/odd_even.py
Last active August 29, 2015 14:03
Show Gist options
  • Save cloneko/06d09127765923b2c4f9 to your computer and use it in GitHub Desktop.
Save cloneko/06d09127765923b2c4f9 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
def isOdd(i):
return False if (i >> 1 << 1) == i 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