Program to check if a number is even or odd.

# Even or Odd
number = int(input("Enter a number: "))

if number % 2 == 0:
    print("The number is even.")
else:
    print("The number is odd.")
Output:
Enter a number: 4
The number is even.

Leave a Reply

Your email address will not be published. Required fields are marked *