Point objects have x and y attributes (X and Y in C#) attributes. Write a function calculating distance between Point a and Point b. Tests round answers to 6 decimal places.
from math import sqrt def distance(a, b): x_diff_sq = (a.x - b.x)**2 y_diff_sq = (a.y - b.y)**2 return round(sqrt(x_diff_sq + y_diff_sq), 2)