DiYane

Multiplication sigh

Sep 20th, 2023
1,216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. num_1=int(input())
  2. num_2=int(input())
  3. num_3=int(input())
  4.  
  5. count=0
  6. zero=False
  7.  
  8. new_list=[num_1,num_2,num_3]
  9. for i in range(len(new_list)):
  10.     if num_3==0 or num_2==0 or num_1==0:
  11.         zero=True
  12.         break
  13.     elif new_list[i]<0:
  14.         count+=1
  15.  
  16. if count==1 or count==3:
  17.     print("negative")
  18. elif zero:
  19.     print("zero")
  20. else:
  21.     print("positive")
Tags: python
Advertisement
Add Comment
Please, Sign In to add comment