# # # from math import sqrt def distance(x1, y1, x2, y2): return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) def inputpoint(prompt): return float(input("Please enter the co-ordinate for" + prompt)) x1 = inputpoint("x1> ") y1 = inputpoint("y1> ") x2 = inputpoint("x2> ") y2 = inputpoint("y2> ") x3 = inputpoint("x3> ") y3 = inputpoint("y3> ") print(x1, y1, x2, y2, x3, y3) # side lengths side1length = distance(x1, y1, x2, y2) side2length = distance(x2, y2, x3, y3) side3length = distance(x3, y3, x1, y1) # add to get perimeter and print it perimeter = side1length + side2length + side3length print("Perimeter:", perimeter)