Python Program to check if a Number Is Positive Or Negative
Find whether a given number is Positive or Negative
In this Python Program, We will discuss how to find a user entered number is positive or negative. We will check by using a if – else block and compare the given number with zero. If user entered number greater than zero then the number is positive. Else, the number is negative.
Step 1. Start
Step 2. Insert the number.
Step 3. If the number is Zero then print “The number is Zero”
Step4: If the number is greater than zero, then print, “The number is Positive”
Step 5. Else print, “The number is Negative”
Step 6. Stop
n=int(input("Enter a number: "))
print("The number is Zero")
print("The number is Positive")
print("The number is Negative")
Enter a number: 23 The number is Positive