Write a Python program that asks the user to enter a number and Depending on whether the number is even or odd, print out an appropriate message to the user.


Topic: Write a Python program that asks the user to enter a number and Depending on whether the number is even or odd, print out an appropriate message to the user.

Solution

number = int(input("Number: "))
if number%2 == 0 and number%4 != 0:
print("Your number is even...")
elif number%4 == 0:
print("Your number is a multiple of 4")
else:
print("Your number is odd...")



List all Python Programs