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
Math,
2 months ago
CBSE BOARD X,
2 months ago
English,
2 months ago
Social Sciences,
5 months ago
Social Sciences,
5 months ago
Math,
10 months ago
English,
10 months ago