Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Draw Spiderman With Python And Turtle

from turtle import *

speed(13) # Painting speed control
bgcolor("#990000")
pensize(10)
penup()
goto(0,50)
pendown()
circle(-120)
penup()
circle(-120,-60)
pendown()
pensize(5)
right(50)
circle(70,55)
right(85)
circle(75,58)
right(90)
circle(70,55)
right(90)
circle(70,58)

# body
penup()
pensize(10)
goto(80,15)
pendown()
seth(92)
fd(135)
seth(125)
circle(30,135)
seth(190)
fd(50)
seth(125)
circle(30,135)
seth(275)
fd(90)

# Arm 1
penup()
pensize(10)
goto(92,-150)
seth(240)
pendown()
fd(80)
left(10)
circle(-28,185)

# Arm 2
penup()
goto(0,50)
seth(0)
pensize(10)
circle(-120,-60)
seth(200)
pendown()
fd(72)
left(20)
circle(30,150)
left(20)
fd(20)
right(15)
fd(10)
pensize(5)
fillcolor("#3366cc")
begin_fill()
seth(92)
circle(-120,31)
seth(200)
fd(45)
left(90)
fd(52)
end_fill()
fd(-12)
right(90)
fd(40)
penup()
right(90)
fd(18)
pendown()
right(86)
fd(40)
penup()
goto(-152,-86)
pendown()
left(40)
circle(35,90)
# Body coloring
penup()
goto(-80,116)
seth(10)
pensize(5)
pendown()
begin_fill()
fillcolor("#3366cc")
fd(155)
seth(-88)
fd(37)
seth(195)
fd(156)
end_fill()
penup()
goto(-75,38)
seth(15)
pendown()
begin_fill()
fd(158)
seth(-88)
fd(55)
seth(140)
circle(120,78)
end_fill()
# Arm 1 To color
penup()
fillcolor("#3366cc")
pensize(5)
goto(75,-170)
pendown()
begin_fill()
seth(240)
fd(30)
right(90)
fd(17)
end_fill()
fd(10)
left(80)
fd(55)
penup()
left(90)
fd(15)
pendown()
left(85)
fd(55)
penup()
goto(43,-225)
left(84)
pendown()
circle(60,51)
speed(0)
Comment

PREVIOUS NEXT
Code Example
Python :: blinking an led with raspberry pi 
Python :: python remove articles from string regex 
Python :: escape brackets in f string 
Python :: python __version__ 
Python :: python getting class name 
Python :: how to generate random normal number in python 
Python :: how to create obtain any random 3 items of list in python 
Python :: show image python 
Python :: how to print to a file in python 
Python :: pytorch detach 
Python :: if list item is found in string get that item python 
Python :: declare numpy zeros matrix python 
Python :: start virtualenv 
Python :: discord py get channel id by name 
Python :: jupyter nbconvert 
Python :: stdout.write python 
Python :: pandas check if value in column is in a list 
Python :: python list comprehension with if 
Python :: python add list to dictionary in loop 
Python :: add column in a specific position pandas 
Python :: how do you see if a data type is an integer python 
Python :: channel lock command in discord.py 
Python :: python get directory of current script file 
Python :: numpy matrix 
Python :: django on_delete options 
Python :: python warning 
Python :: python split only last occurrence of a character 
Python :: measure cell execution time in jupyter notebook 
Python :: jupyter notebook delete the output 
Python :: python choose sample from list with replacement 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =