Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- class Point:
- def __init__(self, x, y):
- self.x = x
- self.y = y
- def distance_between_points(self, p1, p2):
- delta_x = p2.x - p1.x
- delta_y = p2.y - p1.y
- return math.sqrt(delta_x ** 2 + delta_y ** 2)
- print(f'{distance:.3f}')
- p1 = input().split(" ")
- p2 = input().split(" ")
- distance = Point(p1, p2)
- distance.distance_between_points(p1,p2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement