Jayteepix

my_drawing.py

Feb 23rd, 2019
575
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. from shapes import Triangle, Rectangle, Oval, Paper
  2. rect1 = Rectangle()
  3. rect1.set_width(200)
  4. rect1.set_height(100)
  5. rect1.set_color("blue")
  6. rect1.draw()
  7. rect2 = Rectangle()
  8. rect2.set_width(50)
  9. rect2.set_height(150)
  10. rect2.set_color("yellow")
  11. rect2.set_x(100)
  12. rect2.set_y(100)
  13. rect2.draw()
  14. oval1 = Oval()
  15. oval1.set_color("red")
  16. oval1.set_height(80)
  17. oval1.set_width(100)
  18. oval1.randomize(smallest=34, largest=134)
  19. oval1.draw()
  20. tri1 = Triangle(5, 5, 100, 20, 150, 200)
  21. tri1.set_color("green")
  22. tri1.draw()
  23. Paper.display()
Advertisement
Add Comment
Please, Sign In to add comment