Write a python program to test whether a number entered by the user is negative, positive or equal to zero.
PROGRAM:
num=int(input("Enter a number:"))
if (num<0):
print(num, " is a negative.")
elif (num>0):
print(num, "is a positive.")
else:
print(num, "is equal to zero.")
OUTPUT:
No comments:
Post a Comment