You're viewing a single thread.
View all comments
57
comments
return true
is correct around half of the time
79 0 Replyassert IsEven(2) == True assert IsEven(4) == True assert IsEven(6) == True
All checks pass. LGTM
40 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 1 Replyfor even, 50% chance of correctness, same for odd.
0 0 Reply
You've viewed 57 comments.
Scroll to top