Answer:
The program in Python is as follows:
x = int(input("x: "))
y = int(input("y: "))
if x == 0:
if y == 0: print("Origin")
else: print("y axis")
elif x>0:
if y > 0: print("First Quadrant")
elif y < 0: print("Fourth Quadrant")
else: print("x axis")
elif x < 0:
if y > 0: print("Second Quadrant")
elif y < 0: print("Third Quadrant")
else: print("x axis")
Explanation:
These get input for x and y
<em>x = int(input("x: "))</em>
<em>y = int(input("y: "))</em>
If x is 0
if x == 0:
<em>............ and y is 0, then the point is at origin</em>
if y == 0: print("Origin")
<em>............ and y is not 0, then the point is on y-axis</em>
else: print("y axis")
If x is greater than 0
elif x>0:
<em>............ and y is greater than 0, then the point is at in the first quadrant</em>
if y > 0: print("First Quadrant")
<em>............ and y is less than 0, then the point is at in the fourth quadrant</em>
elif y < 0: print("Fourth Quadrant")
<em>............ Otherwise, the point is on the x axis</em>
else: print("x axis")
If x is less than 0
elif x < 0:
<em>............ and y is greater than 0, then the point is at in the second quadrant</em>
if y > 0: print("Second Quadrant")
<em>............ and y is less than 0, then the point is at in the third quadrant</em>
elif y < 0: print("Third Quadrant")
<em>............ Otherwise, the point is on the x axis</em>
else: print("x axis")