python program to to check if a number is positive negative or 0
Answers
Answered by
1
def check_num(num):
if num > 0:
return "positive"
if num < 0:
return "negative"
return "0"
for num in [-69, 0, 69]:
print(check_num(num))
Similar questions
Science,
2 months ago
Math,
2 months ago
Social Sciences,
4 months ago
Social Sciences,
4 months ago
Math,
9 months ago
English,
9 months ago