this post was submitted on 31 Oct 2024
379 points (98.5% liked)

196

16552 readers
3503 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 76 points 3 weeks ago (4 children)

return true

is correct around half of the time

[–] aliser 18 points 3 weeks ago (1 children)
return Math.random() > 0.5

would also be correct about half the time

[–] [email protected] 1 points 3 weeks ago (1 children)

Wouldn't that only be correct about 25% of the time?

[–] rain_worl 0 points 2 weeks ago

for even, 50% chance of correctness, same for odd.

load more comments (2 replies)