Skip to content

Instantly share code, notes, and snippets.

@vrootic
Created July 14, 2020 08:45
Show Gist options
  • Save vrootic/be1db22b148bab7d73ecb51cba1702b7 to your computer and use it in GitHub Desktop.
Save vrootic/be1db22b148bab7d73ecb51cba1702b7 to your computer and use it in GitHub Desktop.
class Point:
def __init__(self, x, y, name):
self.x = x
self.y = y
self.name = name
def get_coordinate(self):
return (self.x, self.y)
def set_name(self, name):
self.name = name
// This function is not important.
def __str__(self):
return f'{self.name} ({self.x}, {self.y})'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment