import turtle
turtle.bgcolor("red")
my_square = turtle.Turtle()
def square(lenght, angle):
my_square.forward(lenght)
my_square.left(angle)
my_square.forward(lenght)
my_square.left(angle)
my_square.forward(lenght)
my_square.left(angle)
my_square.forward(lenght)
for i in range(4):
square(25, 90)
for k in range(4):
square(50, 90)
for j in range(4):
square(75, 90)
for h in range(4):
square(100, 90)
for g in range(4):
square(125, 90)
for f in range(4):
square(150, 90)
for d in range(4):
square(175, 90)
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.