Advertisement
farrismp

Drawing

May 20th, 2019
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. from shapes import Triangle, Rectangle
  2.  
  3. rect = Rectangle()
  4. rect.set_width(300)
  5. rect.set_height(200)
  6. rect.set_x(150)
  7. rect.set_y(300)
  8. rect.set_color("brown")
  9. rect.draw()
  10.  
  11. tri = Triangle(150, 300, 200,200, 200, 300)
  12. tri.set_color("brown")
  13. tri.draw()
  14.  
  15. tri = Triangle(400, 300, 400, 200, 450, 300)
  16. tri.set_color("brown")
  17. tri.draw()
  18.  
  19. rect.set_x(200)
  20. rect.set_y(200)
  21. rect.set_width(200)
  22. rect.set_height(100)
  23. rect.draw()
  24.  
  25. rect.set_x(170)
  26. rect.set_y(325)
  27. rect.set_width(60)
  28. rect.set_height(40)
  29. rect.set_color("white")
  30. rect.draw()
  31.  
  32. rect.set_x(170)
  33. rect.set_y(425)
  34. rect.set_width(60)
  35. rect.set_height(40)
  36. rect.set_color("white")
  37. rect.draw()
  38.  
  39. rect.set_x(360)
  40. rect.set_y(325)
  41. rect.set_width(60)
  42. rect.set_height(40)
  43. rect.set_color("white")
  44. rect.draw()
  45.  
  46. rect.set_x(360)
  47. rect.set_y(425)
  48. rect.set_width(60)
  49. rect.set_height(40)
  50. rect.set_color("white")
  51. rect.draw()
  52.  
  53. rect.set_x(280)
  54. rect.set_y(325)
  55. rect.set_width(40)
  56. rect.set_height(40)
  57. rect.set_color("white")
  58. rect.draw()
  59.  
  60. rect.set_x(280)
  61. rect.set_y(420)
  62. rect.set_width(40)
  63. rect.set_height(80)
  64. rect.set_color("blue")
  65. rect.draw()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement