Programs for practice
In the program below, we used the arithmetic addition operator (%) to find even or odd number.
Source Code: Program to check if a number is positive,negative or zero in Python
# This Program is to check if a number is positive,negative or zero in Python num = int(input("enter a number")) if(num>0): print("positive") elif(num <0): print("negative") else: print("zero")
Outputenter a number: 6 positive