C-17-Q022mediumsingle_mcq
In the textbook even/odd program, the input is converted using:
In the textbook even/odd program, the input is converted using:
- a
float(input(...)) - b
int(input(...)) - c
str(input(...)) - d
bool(input(...))
ব্যাখ্যা
Even/odd checking requires arithmetic with whole numbers, so the input string must be converted to an integer using int(input(...)). This ensures the modulo operation works on a proper integer value.