What is the correct way to check if a number is odd in Python?
A. if number % 2 != 0
B. if number mod 2 != 0
C. if number / 2 != 0
D. if number // 2 != 0 Answer
Answer:A
What is the correct way to check if a number is odd in Python?
A. if number % 2 != 0 B. if number mod 2 != 0 C. if number / 2 != 0 D. if number // 2 != 0 Answer