Quadrant Selection
This commit is contained in:
14
quadrant.py
Normal file
14
quadrant.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import sys
|
||||
|
||||
x = int(sys.stdin.readline())
|
||||
y = int(sys.stdin.readline())
|
||||
|
||||
if 0 < x and 0 < y:
|
||||
print(1)
|
||||
elif x < 0 and 0 < y:
|
||||
print(2)
|
||||
elif x < 0 and y < 0:
|
||||
print(3)
|
||||
else:
|
||||
print(4)
|
||||
|
||||
Reference in New Issue
Block a user