livepython.net

61. Python Program to Check If a Number Is Even or Odd

Easyelse and elif

Overview

Choose between two paths with if and else.

Problem Statement

Read a whole number and print whether it is even or odd. For example, for 7:

7 is odd

Use input() with no prompt text: the tests type the input for you, and a prompt would end up in your output.

Input

One value per line, in this order. Example:

7

Output

The output for that example:

7 is odd

The tests try 3 different inputs.

Learn this firstChapter 8 · Python if, else and elif Explained
solution.py
# write your code here

EXPECTED OUTPUT

17 is odd

YOUR OUTPUT

Press Run to see your output here. Lines are compared with the expected output.