The Typing CatUser Account

Dataclass with type annotations and method

WPM
0
Acc
100%
Err
0
Time
0s
@dataclass⏎
class Point:⏎
x: float⏎
y: float⏎
def distance(self, other: "Point") -> float:⏎
return ((self.x - other.x) ** 2 + (self.y - other.y) ** 2) ** 0.5
~`
!1
@2
#3
$4
%5
^6
&7
*8
(9
)0
_-
+=
Backspace
Tab
Q
W
E
R
T
Y
U
I
O
P
{[
}]
|\
Caps
A
S
D
F
G
H
J
K
L
:;
"'
Enter
Shift
Z
X
C
V
B
N
M
<,
>.
?/
Shift
Ctrl
Alt
Alt
Ctrl

Type the text above. Press Backspace to correct mistakes.

Press Esc to restart.