Numbers and arithmetic · Python exercise
Classify an integer as even or odd using the modulo operator.
Read one integer and print Even when it is divisible by 2, otherwise print Odd. Zero is even.
Example 1
Input
4
Output
Even
Example 2
Input
7
Output
Odd
How testing works
Your code runs once per test case with that case's standard input. Output is compared after normalising trailing spaces and blank lines at the end. Use input() without a prompt when the exercise expects clean output.
Loading editor…
Press Run tests to execute your code against every input case. Python runs in a Web Worker in your browser.