Guest User

Untitled

a guest
Jun 9th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. class Figura():
  2. def __add__(self, other):
  3. x=self.x+other.x
  4. y=self.y+other.y
  5. return Figura(x,y)
  6. def __sub__(self, other):
  7. x=self.x-other.x
  8. y=self.y-other.y
  9. return Figura(x,y)
  10.  
  11.  
  12. def __mul__(self, other):
  13. x=self.x*other.x
  14. y=self.y*other.y
  15. return Figura(x,y)
  16.  
  17.  
  18. dadada= Figura()
Advertisement
Add Comment
Please, Sign In to add comment