top of page

Python Program to Check a Number is Positive, Negative or 0 ?

Writer's picture: Rajesh SinghRajesh Singh

Updated: May 23, 2021



Program:

num = int(input("Enter a number: ")) if num>0:

print("Positive")

elif num<0:

print("Negative") else:

print("Zero")

Output:

Enter a number: 5 Positive

Video:




Recent Posts

See All

Comments


bottom of page