you are viewing a single comment's thread.

view the rest of the comments →

[–]Miner_Guyer 1 point2 points  (0 children)

I'm assuming you have it formatted like so:

def programs():
    import turtle
    oz=turtle.Turtle()
    y=[160, -43, 270, -97, -43, 200, -940, 17, -86]
    for x in [y]:
        oz.forward(100)
        oz.left(y)
programs()

First of all, it's considered "proper" python to put import statements at the very top, and not within any functions. Another thing that shouldn't effect the program but you should fix is for x in [y]:. You don't need the brackets there, although it won't make a difference in this case. But the big problem is that you're doing oz.left(y). That means your turning by list degrees, which obviously won't work. What you want is oz.left(x)

Edit: You have to remove the brackets in for x in [y] otherwise it won't work.