C-17-Q021mediumsingle_mcq
A number is odd when:
A number is odd when:
- a
num % 2 == 0 - b
num % 2 != 0 - c
num / 2 == 0 - d
num // 2 != 0
ব্যাখ্যা
A number is odd when dividing by 2 leaves a remainder, so num % 2 is not equal to . The expression num % 2 != 0 is therefore the correct odd test.