Advertisement
Guest User

drawings by jesus

a guest
Aug 19th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. #Drawing geometric figures. by Jesus Suniaga
  2. from shapes import Triangle,Rectangle, Oval
  3.  
  4. rect1=Rectangle()
  5.  
  6. rect1.set_width(200)
  7. rect1.set_height(100)
  8. rect1.set_color("blue")
  9.  
  10. rect1.draw()
  11.  
  12.  
  13. rect2=Rectangle()
  14.  
  15.  
  16. rect2.set_width(50)
  17. rect2.set_height(150)
  18. rect2.set_color("yellow")
  19.  
  20. rect2.set_x(150)
  21. rect2.set_y(150)
  22. rect2.draw()
  23.  
  24. rect1.set_x(10)
  25. rect1.set_y(10)
  26. rect1.draw()
  27.  
  28. rect3 = Rectangle()
  29. rect3.set_width(50)
  30. rect3.set_height(150)
  31. rect3.set_color("purple")
  32. rect3.set_x(210)
  33. rect3.set_y(210)
  34. rect3.draw()
  35. oval1 = Oval()
  36. oval1.set_height(50)
  37. oval1.set_width(100)
  38. oval1.set_x(250)
  39. oval1.set_y(80)
  40. oval1.set_color("green")
  41. oval1.draw()
  42.  
  43. oval2 = Oval()
  44. oval2.randomize(20,150)
  45. oval2.draw()
  46.  
  47. tri = Triangle()
  48. tri1 = Triangle(200, 400, 350, 420, 450, 500)
  49. tri1.set_color("orange")
  50. tri1.draw()
  51.  
  52. tri = Triangle()
  53. tri2 = Triangle(10, 100, 50, 5, 50, 100)
  54. tri2.set_color("black")
  55. tri2.draw()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement