Sponsored Reserved space — layout preview until AdSense is connected
easy +5 pts

Even or odd?

The first branching problem.

Implement `classify(n: int) -> str`. Return `"even"` if `n` is divisible by 2, otherwise `"odd"`.

Constraints

-10^9 ≤ n ≤ 10^9

Example

>>> classify(4)
"even"
>>> classify(7)
"odd"
5 points ~5 min

Recent Submissions

No submissions yet — hit Run Tests to try!

Hints

Use the modulo operator: n % 2.
Python 3
All tests passed!
Test Results
Press Ctrl+Enter or click Run Tests to execute your code.
Sponsored Reserved space — layout preview until AdSense is connected