Algorithm to check whether the given number is positive and negative.
Answers
Answered by
2
def main(n):
if n == 0:
return "zero"
if n > 0:
return "positive"
return "negative"
print(main((n := int(input("n: ")))))
Similar questions