Thread replies: 6
Thread images: 1
Anonymous
2016-07-17 03:59:52 Post No. 55611426
[Report]
Image search:
[Google]
Anonymous
2016-07-17 03:59:52
Post No. 55611426
[Report]
Please /g/ help me comprehend
num = input("Enter a number: ")
mod = int(num) % 2
if mod > 0:
print("You picked an odd number.")
else:
print("You picked an even number.")
^^^^^^^^^^^^^^^^^^^^^
Why Is It that the number chosen through input divided by 2 has to be greater than 0 to be considered an odd number. 8 divided by 2 Is four, which Is an even number. Could someone explain why this Is?