#import turtleimport turtle
b=turtle.Pen()
b.speed(50)for i inrange(4):for i inrange(4):for i inrange(4):for i inrange(8):for i inrange(3):for i inrange(6):
b.fd(10)
b.lt(60)
b.lt(120)
b.fd(30)for i inrange(2):
b.lt(90)
b.fd(30)
b.lt(-90)
b.fd(10)
b.lt(90)
b.fd(200)
b.lt(90)
# Python program to draw square# using Turtle Programmingimport turtle
skk = turtle.Turtle()for i inrange(4):
skk.forward(50)
skk.right(90)
turtle.done()
import turtle # imports it
whateverYouWantToCallIt = turtle.Turtle()# adds it to the project#code
whateverYouWantToCallIt.forward(10)# moves whateverYouWantToCallIt forward
whateverYouWantToCallIt.color("purple")# color
whateverYouWantToCallIt.left(90)# turns him 90 degrees
whateverYouWantToCallIt.right(90)# turns him 90 degrees the other direction
turtle.write(arg, move=False, align=’left’, font=(‘Arial’,8, ‘normal’))
arg Info, which is to be written to the TurtleScreen
align One of the strings “left”, “center” or right”
font A tuple(fontname, fontsize, fonttype)
import turtle # imports the turtle module.
whateveruwanttocallit = turtle.Turtle()
whateveruwanttocallit.fd(10)# moves forward by whatever you put in
whateveruwanttocallit.lt(90)# turns left whatever degrees you put in
whateveruwanttocallit.rt(90)# turns right whatever degrees you put in
whateveruwanttocallit.color('red')# the color
whateveruwanttocallit.up()# lifts the pen up
whateveruwanttocallit.down()#puts the pen down#you can also import turtle as t to make the 'whateveruwanttocallit' just#written as t. you can also skip the turtle.Turtle() part.
# Draw something that i don't care aboutimport turtle as tu
sc =tu.Screen()
sc.bgcolor("black")
t = tu.Turtle()
t.speed(60)
t.pensize(3)for i inrange(100):
t.circle(5+2* i ,44)if t.pos()[1]>= t.pos()[0]:
t.pencolor("yellow")
t.dot(12)elif t.pos()[1]<= t.pos()[0]:
t.pencolor("blue")
t.dot(12)
t.hideturtle()
sc.exitonclick()