You must log in or # to comment.
return true
is correct around half of the time
assert IsEven(2) == True assert IsEven(4) == True assert IsEven(6) == True
All checks pass. LGTM
return Math.random() > 0.5
would also be correct about half the time
import re def is_even(i: int) -> bool: return re.match(r"-?\d*[02468]$", str(i)) is not None