@Persona3Reload@lemmy.blahaj.zone to 196@lemmy.blahaj.zoneEnglish • 22 hours agoRulelemmy.blahaj.zoneimagemessage-square53fedilinkarrow-up1352arrow-down16
arrow-up1346arrow-down1imageRulelemmy.blahaj.zone@Persona3Reload@lemmy.blahaj.zone to 196@lemmy.blahaj.zoneEnglish • 22 hours agomessage-square53fedilink
minus-square@Euphoma@lemmy.mllinkfedilinkEnglish67•20 hours agoreturn true is correct around half of the time
minus-square@aliser@lemmy.worldlinkfedilink13•13 hours agoreturn Math.random() > 0.5 would also be correct about half the time
minus-square@deo@lemmy.dbzer0.comlinkfedilink1•7 hours agoWouldn’t that only be correct about 25% of the time?
minus-square@ImplyingImplications@lemmy.calinkfedilink32•18 hours agoassert IsEven(2) == True assert IsEven(4) == True assert IsEven(6) == True All checks pass. LGTM
return true
is correct around half of the time
return Math.random() > 0.5
would also be correct about half the time
Wouldn’t that only be correct about 25% of the time?
assert IsEven(2) == True assert IsEven(4) == True assert IsEven(6) == True
All checks pass. LGTM