Following is a program to find out whether a number is EVEN or ODD :
x = int(input("Enter a number\n")) if (x%2==0): print(f"{x} is a even number.") else: print(f"{x} is a odd number.")
x – integer
% – modulus operator
Following is a program to find out whether a number is EVEN or ODD :
x = int(input("Enter a number\n")) if (x%2==0): print(f"{x} is a even number.") else: print(f"{x} is a odd number.")
x – integer
% – modulus operator