Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
8-liner: Sympy Circle of 3x Points solution in Creative category for Three Points Circle by Stensen
from sympy.geometry import Point, Circle
from ast import literal_eval
from math import sqrt
def checkio(points):
P1, P2, P3 = literal_eval(points)
C = Circle(Point(P1), Point(P2), Point(P3))
x, y, r = map(eval, map(str, [*C.center, C.radius]))
return f'(x-{round(x, 2)})^2+(y-{round(y, 2)})^2={round(r, 2) if int(r)!=round(r, 2) else int(r)}^2'
Oct. 25, 2020