Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class my_rectangle:
- def __init__(self,text,x_start,y_start,x_end,y_end):
- self.text=text
- self.x_start=x_start
- self.y_start=y_start
- self.x_end=x_end
- self.y_end=y_end
- self.x_centroid=(self.x_start+self.x_end)/2
- self.y_centroid=(self.y_start+self.y_end)/2
- A=my_rectangle('Hi,',1,3,2,4)
- B=my_rectangle('Im',3,3,3,4)
- C=my_rectangle('New',1,1,2,2)
- my_list=[C,B,A]
- my_sorted_list=[A,B,C]
- """ Hi, I'm
- New
- """
Add Comment
Please, Sign In to add comment