Quilotoa@lemmy.ca to Showerthoughts@lemmy.world · 2 months agoThe whole "toilet seat up, toilet seat down" gender debate could be solved by everybody putting the seat and lid down.message-squaremessage-square396linkfedilinkarrow-up1696
arrow-up1696message-squareThe whole "toilet seat up, toilet seat down" gender debate could be solved by everybody putting the seat and lid down.Quilotoa@lemmy.ca to Showerthoughts@lemmy.world · 2 months agomessage-square396linkfedilink
minus-squareCaptain Aggravated@sh.itjust.workslinkfedilinkEnglisharrow-up8·2 months agoFor me the algorithm is “if(wearing_glasses == True and is_brightly_lit == True): stand; else: sit”.
minus-squareAnAverageSnoot@lemmy.calinkfedilinkEnglisharrow-up9·2 months agoYour variables are already booleans, so you can just write: if wearing_glasses and is_brightly_lit
minus-squarepretzelz@lemmy.worldlinkfedilinkarrow-up10·2 months agoAre they though? Maybe they are inputs that haven’t been sanitised but the language has two kinds of equals and is you use the double equals then it tries to coerce it for you. Lol that with would be silly!
minus-squareFeathercrown@lemmy.worldlinkfedilinkEnglisharrow-up5·2 months agolol what a funny lamguage design horror story. I’m sure glad it’s not real
minus-squaregandalf_der_12te@discuss.tchncs.delinkfedilinkarrow-up1·2 months agoyes but it makes it clearer to do isWearingGlasses == true
For me the algorithm is “if(wearing_glasses == True and is_brightly_lit == True): stand; else: sit”.
Your variables are already booleans, so you can just write:
if wearing_glasses and is_brightly_litAre they though? Maybe they are inputs that haven’t been sanitised but the language has two kinds of equals and is you use the double equals then it tries to coerce it for you. Lol that with would be silly!
lol what a funny lamguage design horror story. I’m sure glad it’s not real
yes but it makes it clearer to do
isWearingGlasses == true