Reputation: 1
I'm running IDLE 3.4.3 in Win7 - Python 3.4.3.
from turtle import Turtle, Screen
turtle = Turtle()
screen = Screen()
turtle.forward(100)
===========================
Traceback (most recent call last): File "C:/Users/xxxx/Desktop/testing.py", line 1, in from turtle import Turtle, Screen File "C:/Users/xxxx/Desktop\turtle.py", line 6, in forward(100) NameError: name 'forward' is not defined
I've tried all I can find on this site but still no joy. Help please.
Upvotes: 0
Views: 3876
Reputation: 41925
File "C:/Users/xxxx/Desktop\turtle.py"
Don't name your source file turtle.py
as that's the name of the turtle module and you end up confusing the import
statement. Name it something else and try again.
Upvotes: 3