Check out above post here - Instagram
Code
from turtle import * #import all package libraries
bgcolor('purple') #set background color of turtle screen as purple
pencolor('white') #set color turle pen by default is black
width(23) #set line thickness
penup() #means pick pen up, so you can move turtle without leaving tracks
#you can also use pu()
goto(160,-100) #move turtle to absolute position
pendown() #puts the pen down and draws as turtle moves
left(90) #change the direction of the turtle at 90 degree
for i in range(4):
forward(250) #move the turtle forward by the value of 250
circle(34,90) #draw a circle with a given radius and degrees as an arc
penup()
goto(85,30)
pendown()
circle(80,360)
penup()
goto(110,130)
pendown()
circle(7,360)
Output
Comments
Post a Comment