DiYane

Spiderman

May 10th, 2023 (edited)
957
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.61 KB | None | 0 0
  1. #Import the turtle
  2. import turtle
  3.  
  4. #Set the turtle object
  5. t=turtle.Turtle()
  6. scr=turtle.Screen()
  7. scr.bgcolor("red")
  8.  
  9. #draw the head
  10. t.goto(0,0)
  11. t.begin_fill()
  12. t.circle(20)
  13. t.end_fill()
  14.  
  15. #draw the body
  16. t.penup()
  17. t.setheading(270)
  18. t.left(60)
  19. t.pendown()
  20. t.begin_fill()
  21. t.forward(20)
  22. t.right(80)
  23. t.forward(70)
  24. t.right(147)
  25. t.forward(70)
  26. t.right(80)
  27. t.forward(20)
  28. t.penup()
  29. t.end_fill()
  30.  
  31. # right upper first upper leg
  32. t.pendown()
  33. t.goto(10,35)
  34. t.pendown()
  35. t.begin_fill()
  36. t.left(20)
  37. t.forward(25)
  38. t.right(60)
  39. t.forward(50)
  40. t.left(120)
  41. t.forward(80)
  42. t.right(175)
  43. t.forward(95)
  44. t.right(127)
  45. t.forward(63)
  46. t.left(60)
  47. t.forward(18)
  48. t.end_fill()
  49.  
  50. # right upper second leg
  51.  
  52. t.pendown()
  53. t.goto(13,25)
  54. t.pendown()
  55. t.begin_fill()
  56. t.left(90)
  57. t.left(90)
  58. t.forward(20)
  59. t.right(60)
  60. t.forward(80)
  61. t.left(125)
  62. t.forward(130)
  63. t.right(175)
  64. t.forward(145)
  65. t.right(128)
  66. t.forward(95)
  67. t.left(60)
  68. t.forward(20)
  69. t.end_fill()
  70. t.penup()
  71.  
  72. #left first upper leg of the spider
  73. t.pendown()
  74. t.goto(-10,35)
  75. t.pendown()
  76. t.begin_fill()
  77. t.right(80)
  78. t.forward(25)
  79. t.left(60)
  80. t.forward(50)
  81. t.right(120)
  82. t.forward(80)
  83. t.left(175)
  84. t.forward(95)
  85. t.left(127)
  86. t.forward(63)
  87. t.right(60)
  88. t.forward(18)
  89. t.end_fill()
  90.  
  91. #left second upper leg of the spider
  92. t.pendown()
  93. t.goto(-13,25)
  94. t.pendown()
  95. t.begin_fill()
  96. t.right(90)
  97. t.right(90)
  98. t.forward(20)
  99. t.left(60)
  100. t.forward(80)
  101. t.right(125)
  102. t.forward(130)
  103. t.left(175)
  104. t.forward(145)
  105. t.left(128)
  106. t.forward(95)
  107. t.right(60)
  108. t.forward(20)
  109. t.end_fill()
  110. t.penup
  111.  
  112. #right first lower leg of spider
  113. t.pendown()
  114. t.goto(15,12)
  115. t.left(60)
  116. t.begin_fill()
  117. t.forward(20)
  118. t.right(40)
  119. t.forward(95)
  120. t.right(100)
  121. t.forward(135)
  122. t.right(175)
  123. t.forward(120)
  124. t.left(90)
  125. t.forward(80)
  126. t.left(40)
  127. t.forward(20)
  128. t.end_fill()
  129.  
  130. #right second lower leg of the spider
  131. t.pendown()
  132. t.goto(11,8)
  133. t.left(150)
  134. t.begin_fill()
  135. t.forward(25)
  136. t.right(10)
  137. t.forward(65)
  138. t.right(95)
  139. t.forward(70)
  140. t.right(175)
  141. t.forward(60)
  142. t.left(85)
  143. t.forward(65)
  144. t.left(15)
  145. t.forward(15)
  146. t.end_fill()
  147.  
  148. #left lower first leg of the spider
  149. t.pendown()
  150. t.goto(-15,14)
  151. t.right(3)
  152. t.begin_fill()
  153. t.forward(20)
  154. t.left(40)
  155. t.forward(95)
  156. t.left(100)
  157. t.forward(135)
  158. t.left(175)
  159. t.forward(120)
  160. t.right(90)
  161. t.forward(80)
  162. t.right(40)
  163. t.forward(20)
  164. t.end_fill()
  165. t.penup()
  166.  
  167. #left lower second leg of the spider
  168. t.pendown()
  169. t.goto(-11,8)
  170. t.right(90)
  171. t.right(60)
  172. t.begin_fill()
  173. t.forward(25)
  174. t.left(10)
  175. t.forward(65)
  176. t.left(95)
  177. t.forward(70)
  178. t.left(175)
  179. t.forward(60)
  180. t.right(85)
  181. t.forward(65)
  182. t.right(15)
  183. t.forward(15)
  184. t.end_fill()
  185.  
  186. t.hideturtle()
  187. turtle.done()
Advertisement
Add Comment
Please, Sign In to add comment