bài 3
from math import sqrt
from math import pow
def dodai(ax, ay, bx, by):
return sqrt(pow(bx - ax, 2) + pow(by - ay, 2))
x1= float(input("x1"))
y1= float(input("y1"))
x2= float(input("x2"))
y2= float(input("y2"))
x3= float(input("x3"))
y3= float(input("y3"))
dab= dodai(x1, y1, x2, y2)
dbc= dodai(x2, y2, x3, y3)
dac= dodai(x1, y1, x3, y3)
print("d_AB= {:.3f}".format(dab))
print("d_BC= {:.3f}".format(dbc))
print("d_AC= {:.3f}".format(dac))