Reputation: 21
import turtle
t = turtle.Turtle()
t.forward(100)
t.done()
Upvotes: 1
Views: 50
Reputation: 27567
The problem lies on this line:
t.done()
You see, you defined t
as a Turtle
object, and Turtle
objects have no attribute done
.
The done()
attribute belongs to the turtle
module itself, so instead of t.done()
, it's turtle.done()
:
import turtle
t = turtle.Turtle()
t.forward(100)
turtle.done()
Upvotes: 1