LearnPy Hub
← Classes & Objects problems
Medium

Point Distance

Write a Point class with x and y and a method distance_to(other). Read two points and print the distance with 2 decimals.

Input

Two lines: x y.

Output

The distance.

Sample 1

Input
0 0
3 4
Output
5.00

Sample 2

Input
1 1
1 1
Output
0.00
solution.py
Output appears here
Point Distance · Python practice problem · LearnPy Hub