Rate My Is Even And Odd Function

Rate My Is Even And Odd Function
python-memes, algorithms-memes, bad-code-memes, inefficient-memes, modulo-memes | ProgrammerHumor.io

OH. MY. GOD. Someone actually wrote a function that loops through EVERY NUMBER from 0 to x just to check if a number is even or odd?! 💀

Instead of using the BASIC MODULO OPERATOR that exists in LITERALLY EVERY PROGRAMMING LANGUAGE, this psychopath decided "you know what would be fun? Let's make the computer count to potentially INFINITY and then return True if i equals 1 or 2!"

The absolute AUDACITY to write if i == 1: return True for even numbers and if i == 2: return True for odd numbers has me SCREAMING into my mechanical keyboard! This is what happens when you code at 4am after your fifth energy drink!

More Like This