16 lines
274 B
Python
16 lines
274 B
Python
|
|
|
|
class Point:
|
|
|
|
def __init__(self, x: float, y: float) -> None:
|
|
self.x = x
|
|
self.y = y
|
|
|
|
def to_dict(self):
|
|
|
|
data: dict[str: float] = {
|
|
"x": self.x,
|
|
"y": self.y,
|
|
}
|
|
|
|
return data |