x=int(raw_input(‘Enter the values for X’))
 
y=int(raw_input(‘Enter the values for Y’))

if x > 0 and y > 0:
  print ‘x, y point lies in the First quandrant’
 
elif x < 0 and y > 0:
  print ‘x, y point lies in the Second quandrant’
 
elif x < 0 and y < 0:
  print ‘x, y point lies in the Third quandrant’

elif x > 0 and y < 0:
  print ‘x, y point lies in the Fourth quandrant’

elif x == 0 and y == 0:
  print ‘x, y point lies at the origin’

Source link

To read a coordinate point in a XY coordinate system and determine its Quadrant

Leave a Reply

Your email address will not be published. Required fields are marked *