Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from shapes import Triangle, Rectangle, Oval, Paper
- rect1 = Rectangle()
- rect1.set_width(200)
- rect1.set_height(100)
- rect1.set_color("blue")
- rect1.draw()
- rect2 = Rectangle()
- rect2.set_width(50)
- rect2.set_height(150)
- rect2.set_color("yellow")
- rect2.set_x(100)
- rect2.set_y(100)
- rect2.draw()
- oval1 = Oval()
- oval1.set_color("red")
- oval1.set_height(80)
- oval1.set_width(100)
- oval1.randomize(smallest=34, largest=134)
- oval1.draw()
- tri1 = Triangle(5, 5, 100, 20, 150, 200)
- tri1.set_color("green")
- tri1.draw()
- Paper.display()
Advertisement
Add Comment
Please, Sign In to add comment