You're viewing a single thread.
All comments
57
comments
return true
is correct around half of the time
81 0 Replyassert IsEven(2) == True assert IsEven(4) == True assert IsEven(6) == True
All checks pass. LGTM
41 0 Replyreturn Math.random() > 0.5
would also be correct about half the time
18 0 ReplyWouldn't that only be correct about 25% of the time?
2 0 Replyfor even, 50% chance of correctness, same for odd.
0 0 Reply
57
comments
Scroll to top