Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- import sys
- xc = float(input("x:"))
- yc = float(input("y:"))
- r = float(input("r:"))
- while True:
- x = float(input("x= "))
- y = float(input("y= "))
- dist = math.sqrt((x-xc) * (x-xc) + (y-yc) * (y-yc) )
- if dist == r:
- print("Border")
- if dist < r:
- print("Inside")
- if dist > r:
- print("Outside")
- question = input("Do you want to continue: ")
- if question == "yes":
- continue
- if question == "OVER" or "over" or "no":
- sys.exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement