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")
Step-by-step explanation:
These get input for x and y
x = int(input("x: "))
y = int(input("y: "))
If x is 0
if x == 0:
............ and y is 0, then the point is at origin
if y == 0: print("Origin")
............ and y is not 0, then the point is on y-axis
else: print("y axis")
If x is greater than 0
elif x>0:
............ and y is greater than 0, then the point is at in the first quadrant
if y > 0: print("First Quadrant")
............ and y is less than 0, then the point is at in the fourth quadrant
elif y < 0: print("Fourth Quadrant")
............ Otherwise, the point is on the x axis
else: print("x axis")
If x is less than 0
elif x < 0:
............ and y is greater than 0, then the point is at in the second quadrant
if y > 0: print("Second Quadrant")
............ and y is less than 0, then the point is at in the third quadrant
elif y < 0: print("Third Quadrant")
............ Otherwise, the point is on the x axis
else: print("x axis")