Python Turtle Program not working
<p>Can't figure out why am I getting this error: AttributeError: 'str' object has no attribute 'forward'</p>

<p>Write a function named drawSquare. The function drawSquare takes two
parameters: a turtle, t and an integer, length, that is the length of a side of the square.</p>

<p>The function drawSquare should use the parameter t to draw the square.
Do not make any assumptions about the initial up/down state of the turtle,
its position on the screen or its orientation. The function drawSquare
should begin drawing with the turtle at its initial position and
orientation. When drawSquare returns, the turtle should again be in its
initial position and orientation.
You must use a loop for repeated operations.</p>

<pre><code>import turtle

s = turtle.Screen()
t = turtle.Turtle()

def drawSquare(t, length):
    for i in range(4):
        t.forward(length)
        t.right(90)

drawSquare('turtle', 100)
</code></pre>

<p>In the last line, when you made the call to your drawSquare function you passed the string 'turtle' - pass in your Turtle object t instead.</p>

python turtle-graphics