PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
'''
How to Set Inputs:
- Set run_with_inputs = False to run using default Points (without user inputs).
NOTE: When False, just leave the inputs window blank on Code Playground.
- Set run_with_inputs = True to run with user inputs.
NOTE: On Code Playground, all inputs must be entered before the code will run. Each input must be entered one value per line.
SAMPLE Inputs to copy and paste:
0
0
0
4
3
0
'''
import math
run_with_inputs = True
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def distance(self, point):
return round(
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run