Write a python program to check if a number is positive, negative or 0


Topic: Write a python program to check if a number is positive, negative or 0

Solution

num = float(input("Enter a number: "))
if num > 0:
   print("Positive number")
elif num == 0:
   print("Zero")
else:
   print("Negative number")



List all Python Programs