Number is Positive and Negative or Zero in Python.
number = float(input("Enter a number :: "))
if number > 0:
print("{0} is a positive number ".format(number))
elif number == 0:
print("{0} is zero :".format(number))
else:
print("{0} is negative number ".format(number))
OUTPUT
Enter a number :: 25
25.0 is a positive number
No comments:
Post a Comment
Please do not any spam link in Comment Box