a collection of stupid way to find if a number is even (inspired by r/ProgrammerHumor)
(please do not PM me to say some function are not working, i know)
don't forget to leave a โญ!
- find a stupid and/or funny way to find if a number is even
- check if your function is not already mentioned (see below)
- implement it in Python 3 with a docstring comment
- make a pull request (precise if you want to be credited and how)
function that are slight variante of already existing ones
for exemple :
# already indide
def isEven(n):
# something
return expression
your PR:
def isEven(n):
# the same something
if expression:
return True
else:
return False
other exemple:
# already inside
def isEven(n):
# something
if a in (b, c, d, ...)
...
your PR:
# already inside
def isEven(n):
# the same something
if a == b or a == c or a == d or ...
...