Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from shapes import Triangle, Rectangle, Oval
- rect1 = Rectangle()
- rect1.set_width(200)
- rect1.set_height(100)
- rect1.set_color("blue")
- rect1.draw()
- rect2 = Rectangle()
- rect2.set_width(300)
- rect2.set_height(150)
- rect2.set_color("red")
- rect2.set_x(100)
- rect2.set_y(100)
- rect2.draw()
- ov1 = Oval()
- ov1.randomize()
- ov1.set_color("orange")
- ov1.set_x(100)
- ov1.set_y(300)
- ov1.draw()
- tri = Triangle(100, 500, 50, 700, 150, 700)
- tri.set_color("purple")
- tri.draw()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement