![]() |
#2
南山浅悠然2018-03-27 11:13
|
import math
def main():
print("Please enter (x,y) of the two points in turn:")
x1,y1=eval(input("Point1:(x,y)="))
x2, y2 = eval(input("Point2:(x,y)="))
def square(x):
return x*x
def distance (x1,y1,x2,y2):
dist=math.sqrt(square(x1-x2)+square(y1-y2))
return dist
print("The distance of two points is :" 'dist')
main()