Back
Close

Computing with Data

elgeish
137.1K views

Docstrings

class Point(object):
"A point in a two-dimensional space"
def __init__(self, x=0, y=0):
"""
Initializes the point object to the origin by default,
or otherwise the initializes to the passed x,y arguments.
"""
self.x = x
self.y = y
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants