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

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:




40 views0 comments

Recent Posts

See All