def sqr(x):
return x*x
def sqrt(n):
x = n
y = 1.0
eps = 0.000001
while x - y > eps:
x = (x + y) / 2
y = n / x
return x
def main():
print("Circle:")
x0 = float(input("x0="))
y0 = float(input("y0="))
R = float(input("R="))
print("Point:")
x = float(input("x="))
y = float(input("y="))
dist = sqrt(sqr(x-x0) + sqr(y-y0))
print(dist)
dist -= R;
if dist < 0:
print("The point is inside Circle")
elif dist == 0:
print("The point on the Circle")
else:
print("The point is outside Circle")
main()
CmRlZiBzcXIoeCk6CiAgICByZXR1cm4geCp4CmRlZiBzcXJ0KG4pOgogICAgeCA9IG4KICAgIHkgPSAxLjAKICAgIGVwcyA9IDAuMDAwMDAxCiAgICB3aGlsZSB4IC0geSA+IGVwczoKICAgICAgICB4ID0gKHggKyB5KSAvIDIKICAgICAgICB5ID0gbiAvIHgKICAgIHJldHVybiB4CmRlZiBtYWluKCk6CiAgICBwcmludCgiQ2lyY2xlOiIpCiAgICB4MCA9IGZsb2F0KGlucHV0KCJ4MD0iKSkKICAgIHkwID0gZmxvYXQoaW5wdXQoInkwPSIpKQogICAgUiA9IGZsb2F0KGlucHV0KCJSPSIpKQogICAgcHJpbnQoIlBvaW50OiIpCiAgICB4ID0gZmxvYXQoaW5wdXQoIng9IikpCiAgICB5ID0gZmxvYXQoaW5wdXQoInk9IikpCiAgICBkaXN0ID0gc3FydChzcXIoeC14MCkgKyBzcXIoeS15MCkpCiAgICBwcmludChkaXN0KQogICAgZGlzdCAtPSBSOwogICAgaWYgZGlzdCA8IDA6CiAgICAgICAgcHJpbnQoIlRoZSBwb2ludCBpcyBpbnNpZGUgQ2lyY2xlIikKICAgIGVsaWYgZGlzdCA9PSAwOgogICAgICAgIHByaW50KCJUaGUgcG9pbnQgb24gdGhlIENpcmNsZSIpCiAgICBlbHNlOgogICAgICAgIHByaW50KCJUaGUgcG9pbnQgaXMgb3V0c2lkZSBDaXJjbGUiKQoKbWFpbigp