What is the correct way to check if a number is even 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:D
What is the correct way to check if a number is even in Python?
A. if number % 2 == 0 B. if number mod 2 == 0 C. if number / 2 == 0 D. if number // 2 == 0 Answer