Destide@feddit.uk to Programmer Humor@lemmy.mlEnglish · 2 months agoInfallible Codeimagemessage-square165fedilinkarrow-up1489arrow-down128
arrow-up1461arrow-down1imageInfallible CodeDestide@feddit.uk to Programmer Humor@lemmy.mlEnglish · 2 months agomessage-square165fedilink
minus-squareFunkyStuff [he/him]@hexbear.netlinkfedilinkEnglisharrow-up5·edit-22 months agoThrowback to when someone shared the OG version of this meme to my uni chat, I replied with "Oh you can simply do def is_even(n: int) -> boolean: if n > 0 return not is_even(n - 1) elif n < 0 return not is_even(n + 1) else return True And instead of laughing at the joke the TA in the chat said “When you start getting internships you’ll do n % 2” like I was being serious.
Throwback to when someone shared the OG version of this meme to my uni chat, I replied with "Oh you can simply do
def is_even(n: int) -> boolean: if n > 0 return not is_even(n - 1) elif n < 0 return not is_even(n + 1) else return True
And instead of laughing at the joke the TA in the chat said “When you start getting internships you’ll do
n % 2
” like I was being serious.