Python | Program to Check if Number is Positive/Negative

In any programming language, for dealing with Data you need to check if some number variable is positive or negative.
In this article, I’ll discuss Python Code for Checking if Number is Positive/Negative.

Python Code for Checking if Number is Positive/Negative

# Python Program to Check if Number is positive/negative

num = float(input("Enter the number => "))

# Checks if Number is positive/negative
if (num > 0):
	print(num, "is positive")
else:
	print(num, "is negative")

Output of Above Code

Enter the number => 72
72.0 is positive
Comments to: Python | Program to Check if Number is Positive/Negative

Your email address will not be published.