So I am learning python and after each page the website asks me to practice. They use turtles as an example if things work since it's easy to spot. Now, I don't have any idea at all how to do this one. I am supposed to draw this: http://puu.sh/8f0fA.jpg
This is the code I got so far (I do know it isn't the way to do it but it is at least a foundation to start off with)
import turtle
def pattern(turtle, sideLenght):
for i in range(6):
turtle.up()
turtle.goto(turtle.pos() + (+10,+10))
turtle.left(90)
turtle.forward(sideLenght)
turtle.down()
for i in range(4):
turtle.forward(sideLenght)
turtle.left(90)
wn = turtle.Screen()
wn.bgcolor("lightgreen")
alex = turtle.Turtle()
alex.color("pink")
alex.pensize(4)
alex.speed(1)
pattern(alex,200)
wn.exitonclick()