Advertisement
viligen

multiplication_sign_without_multiplying

Oct 11th, 2021
994
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. def multipl_sign(num1, num2, num3):
  2.     num_list = [num1, num2, num3]
  3.     if len(list(filter(lambda x: x == 0, num_list))) >= 1:
  4.         return "zero"
  5.     elif len(list(filter(lambda x: x < 0, num_list))) == 1 or len(list(filter(lambda x: x < 0, num_list))) == 3:
  6.         return "negative"
  7.     elif len(list(filter(lambda x: x > 0, num_list))) == 1 or len(list(filter(lambda x: x > 0, num_list))) == 3:
  8.         return "positive"
  9.  
  10.  
  11. number1 = int(input())
  12. number2 = int(input())
  13. number3 = int(input())
  14.  
  15. print(multipl_sign(number1, number2, number3))
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement