Python Program to check whether the number is even or odd without using % operator

num=int(input("Enter a number"))
if((num//2)*2==num):
    print(num,"is even number")
else:
    print(num,"is odd number")

Comments