Advertisement
Guest User

Untitled

a guest
May 24th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #!/usr/bin/env python3
  2. # A poke in the eye for Matisse!
  3. from shapes import Triangle, Rectangle, Oval, Paper
  4.  
  5. rect1 = Rectangle()
  6. rect1.set_width(200)
  7. rect1.set_height(100)
  8. rect1.set_color("blue")
  9. rect1.draw()
  10.  
  11. rect2 = Rectangle()
  12. rect2.set_width(50)
  13. rect2.set_height(150)
  14. rect2.set_color("yellow")
  15. rect2.set_x(100)
  16. rect2.set_y(100)
  17. rect2.draw()
  18.  
  19. oval1 = Oval()
  20. oval1.randomize()
  21. oval1.draw()
  22.  
  23. tri1 = Triangle(5,5,100,5,100,200)
  24. tri1.draw()
  25.  
  26. for shape in range(100):
  27. tri = Triangle()
  28. tri.randomize()
  29. tri.draw()
  30.  
  31. Paper.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement