ProgrammerHumor

iEvenIsIntuative

iEvenIsIntuative
https://i.redd.it/onk8xxoa8ycf1.jpeg
Reddit

Discussion

secret_green_link

isEven(-8)

Uh? What do you mean that's not how it works?

6 hours ago
Bonzie_57 OP
:ru::ts::py::ansible:

We just wait out for the overflow

6 hours ago
sathdo
:j::g::c:

Python 3 ints don't overflow, they just allocate more ram.

5 hours ago
Same-Letter6378

What happens if you run out of ram?

5 hours ago
goldenfrogs17

then it's odd, or even, it depends on host system

4 hours ago
kraskaskaCreature
:kt::lsp:

swap

4 hours ago
tapita69

we autoscale machines with more ram and keep going!

3 hours ago
kampi1989

Kein Problem. Einfach auf den swap auslagern oder das Programm mit dem Hinweis pausieren das mehr RAM nachgerüstet werden muss. Wenn der swap ausgeht, wird einfach auf die Cloud umgestiegen.

3 hours ago
AndreLinoge55
:sw:

just download more RAM

3 hours ago
Excellent-Refuse4883

IsEven(1000000000)

5 hours ago
PinkSwayy

Technically correct. Also a speedrun to stack overflow

5 hours ago
wyldcraft

Some languages will optimize the tail recursion, but not python.

5 hours ago
Obvious_Tea_8244

Somebody must’ve screenshotted another PirateSoftware project.

5 hours ago
callyalater
:kt:

Inside the else block, you could nest another if/else statement to check if the number is less than 0 and if it is, return isEven(num+2), else return isEven(num-2).

5 hours ago
x3n0m0rph3us

Old post.

5 hours ago
Reasonable-Hair-187

Why are we going back to this?

5 hours ago
PossibilityTasty

Did you just UperCamelCase a Python function?

5 hours ago
Excellent-Refuse4883

5 hours ago
goldenfrogs17

I finally understand recursion.

4 hours ago
strikerdude10

Almost there. Just needs some memoization!

2 hours ago
FRleo_85
:py:

may i interest you in other ways to find if a number is even? https://github.com/desaleo/is-even

1 hour ago