Home >>Python Programs >Python Program to check number is positive negative or zero
In this example, we will see a Python program to distinguish that if a number is positive, negative or zero. Any number is known as a positive number if it has a greater value than zero like 1, 2, 3, 4 etc and any number is known as a negative number if it has a lesser value than zero like -1, -2, -3, -4 etc.
Example :
num = float(input("Enter a number: "))
if num > 0:
print("{0} is a positive number".format(num))
elif num == 0:
print("{0} is zero".format(num))
else:
print("{0} is negative number".format(num))