andioop to Programming HorrorEnglish · edit-21 year agoGod I wish there was an easier way to do thisimagemessage-square55fedilinkarrow-up1216arrow-down121
arrow-up1195arrow-down1imageGod I wish there was an easier way to do thisandioop to Programming HorrorEnglish · edit-21 year agomessage-square55fedilink
minus-squareRandomVideoslinkfedilinkarrow-up2·1 year agoThis code is terrible. If you input 10.66 it returns "number is odd It should be: if number % 2 == 0 return "number is even" (is_num_even = 1 or true) else return "number is not even" (is_num_even = 0 or false)
This code is terrible. If you input 10.66 it returns "number is odd
It should be:
if number % 2 == 0 return "number is even" (is_num_even = 1 or true) else return "number is not even" (is_num_even = 0 or false)