Question #222931

A number N is given as input. Write a program to check if N is positive or negative.

N = -12.5. As the value of N is less than 0, the output should be Negative.



Expert's answer

N = float(input())
if N > 0:
    print('Positive')
elif N < 0:
    print('Negative')
else:
    print('Zero')

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS