# # # from math import sqrt def distance(x1, y1, x2, y2): return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 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> ")) print(x1, y1, x2, y2, x3, y3) # side lengths side1length = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) side2length = sqrt((x3 - x2) ** 2 + (y3 - y2) ** 2) side3length = sqrt((x3 - x1) ** 2 + (y3 - y1) ** 2) # add to get perimeter and print it perimeter = side1length + side2length + side3length print("Perimeter:", perimeter)