Advertisement
Nenogzar

Untitled

Feb 8th, 2024
1,072
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. num1, num2, num3 = map(lambda _: int(input()), range(3))
  2.  
  3.  
  4. def check_numbers(num1, num2, num3):
  5.     if (num3 > 0 and num1 < 0 and num2 < 0) or \
  6.             (num2 > 0 and num1 < 0 and num3 < 0) or \
  7.             (num1 > 0 and num2 < 0 and num3 < 0) or \
  8.             (num1 > 0 and num2 > 0 and num3 > 0):
  9.         return "positive"
  10.     elif num1 == 0 or num2 == 0 or num3 == 0:
  11.         return "zero"
  12.     elif num1 < 0 or num2 < 0 or num3 < 0:
  13.         return "negative"
  14.  
  15.  
  16. print(check_numbers(num1, num2, num3))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement