Thursday, 9 April 2020

Program: check number is positive or negative in python

n=eval(input("enter any number"))
if n>=0:
    print(n," is positive")
else:
    print(n, "is negative")

No comments:

Post a Comment