def is_even(num:int) -> bool: if x < 0: x = x * (-1) if x == 0: return True elif x == 1: return False elif x == 2: return True elif x == 3: return False elif x == 4: return True elif x == 5: return False elif x == 6: return True elif x == 7: return False # ...
Comment on monumentale
zr0@lemmy.dbzer0.com 3 weeks ago
Is the function called is_even()?
kryptonianCodeMonkey@lemmy.world 3 weeks ago
Taldan@lemmy.world 3 weeks ago
Yes, and it only returns, “I can’t even”
railwhale@lemmy.nz 3 weeks ago
Here, I optimised it:
olenkoVD@lemmy.dbzer0.com 3 weeks ago
what unholy combination of programming languages is this