Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Figura():
- def __init__(self, x ,y):
- self.x = x
- self.y = y
- def __add__(self, other):
- x=self.x+other.x
- y=self.y+other.y
- return Figura(x,y)
- def __sub__(self, other):
- x=self.x-other.x
- y=self.y-other.y
- return Figura(x,y)
- def __mul__(self, other):
- x=self.x*other.x
- y=self.y*other.y
- return Figura(x,y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement