SHARE
TWEET

Untitled

a guest May 21st, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from shapes import Triangle, Rectangle, Oval
  2.  
  3. #outerrectangle
  4. rect1 = Rectangle()
  5. rect1.set_x(100)
  6. rect1.set_y(100)
  7. rect1.set_width(400)
  8. rect1.set_height(400)
  9. rect1.set_color('#4B8BBE')
  10. rect1.draw()
  11.  
  12. rect2 = Rectangle()
  13. rect2.set_x(120)
  14. rect2.set_y(120)
  15. rect2.set_width(360)
  16. rect2.set_height(360)
  17. rect2.set_color('#306998')
  18. rect2.draw()
  19.  
  20. rect3 = Rectangle()
  21. rect3.set_x(140)
  22. rect3.set_y(140)
  23. rect3.set_width(320)
  24. rect3.set_height(320)
  25. rect3.set_color('#FFE873')
  26. rect3.draw()
  27.  
  28. rect4 = Rectangle()
  29. rect4.set_x(160)
  30. rect4.set_y(160)
  31. rect4.set_width(280)
  32. rect4.set_height(280)
  33. rect4.set_color('#4B8BBE')
  34. rect4.draw()
  35.  
  36. rect5 = Rectangle()
  37. rect5.set_x(180)
  38. rect5.set_y(180)
  39. rect5.set_width(240)
  40. rect5.set_height(240)
  41. rect5.set_color('#306998')
  42. rect5.draw()
  43.  
  44. #innerrectangle
  45. rect6 = Rectangle()
  46. rect6.set_x(200)
  47. rect6.set_y(200)
  48. rect6.set_width(200)
  49. rect6.set_height(200)
  50. rect6.set_color('#FFE873')
  51. rect6.draw()
  52.  
  53. #circle
  54. oval1 = Oval()
  55. oval1.set_x(220)
  56. oval1.set_y(220)
  57. oval1.set_width(160)
  58. oval1.set_height(160)
  59. oval1.set_color('#4B8BBE')
  60. oval1.draw()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top