Tuesday, 11 June 2019

Python program to find whether the number is positive and negative

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

No comments:

Post a Comment