Persona3Reload@lemmy.blahaj.zone to 196@lemmy.blahaj.zoneEnglish · 22 days agoRulelemmy.blahaj.zoneexternal-linkmessage-square57fedilinkarrow-up1393arrow-down16
arrow-up1387arrow-down1external-linkRulelemmy.blahaj.zonePersona3Reload@lemmy.blahaj.zone to 196@lemmy.blahaj.zoneEnglish · 22 days agomessage-square57fedilink
minus-squareEuphoma@lemmy.mllinkfedilinkEnglisharrow-up81·22 days agoreturn true is correct around half of the time
minus-squareImplyingImplications@lemmy.calinkfedilinkarrow-up41·22 days agoassert IsEven(2) == True assert IsEven(4) == True assert IsEven(6) == True All checks pass. LGTM
minus-squarealiser@lemmy.worldlinkfedilinkarrow-up18·22 days agoreturn Math.random() > 0.5 would also be correct about half the time
minus-squaredeo@lemmy.dbzer0.comlinkfedilinkarrow-up2arrow-down1·22 days agoWouldn’t that only be correct about 25% of the time?
minus-squareRain World: Slugcat Game@lemmy.worldlinkfedilinkEnglisharrow-up0·19 days agofor even, 50% chance of correctness, same for odd.
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
would also be correct about half the time
Wouldn’t that only be correct about 25% of the time?
for even, 50% chance of correctness, same for odd.