I'm not sure why my code isn't fully printing. It isn't printing the quadrants.
Here are my instructions:
- You are writing a program that checks if a point (a,b) is inside a circle of radius R that is centered on the point (c,d).
-a,b,c,d,R are all integers entered from the keyboard -Do not allow negative R values to be entered -The output can be a simple statement indicating if the (a,b) point is “In the Circle”, “Out of the Circle”, “On the Circle” -Also output the Quadrant (I,II,III, IV) that the point (a,b) is located in. If the point happens to be on either the x or y axis, then output which axis it is on. -Your program is to continue forever until a radius of 0 is entered.
Note: If you are wondering about how to compute the distance between 2 points…. use the Pythagorean Theorem
Here's my code:
import math
while True:
    a= int(input("Please enter the value of a:"))
    b= int(input("Please enter the value of b:"))
    c= int(input("Please enter the value of c:"))
    d= int(input("Please enter the value of d:"))
    r= int(input("Please enter the value of R:"))
#XI= c, Y1= d .... X2= a, Y2= b
    xs= ((a)-c)**2
    ys= ((b)-d)**2
    together= xs+ys
    distance= math.sqrt(together)
   if distance > r:
      print("Out of the circle")
   if distance < r:
      print("In the circle")
   if distance == r:
      print("On the circle")
#If the point lies on the x or y axis:
   if a == 0:
      print("On y axis")
   if b == 0:
      print("On x axis")
        
#Quadrant I:
   if a < r < 0 and b < r < 0:
      print("Quadrant I")
    
#Quadrant II:
   if -a < r < 0 and b < r < 0:
      print("Quadrant II")
#Quadrant III:
   if -a < r < 0 and -b < r < 0:
      print("Quadrant III")
#Quadrant IV:
   if a < r < 0 and -b < r < 0:
       print("Quadrant IV")
   if r == -r or r == 0:
       break
 
     
    