Skip to content
← Back to Community
I'm getting an Import Error in the code
Profile icon
Hero2207

I have defined everything correctly even though i have getting an Import Error

Voters
Profile icon
enelinpelin
Profile icon
Hero2207
Comments
hotnewtop
Profile icon
Coder100

You have to import turtle not dog. turtle is the module name and cannot be changed:

import turtle a_dog = turtle.Turtle() # it can be called a_dog because that is a variable you defined.
Profile icon
abc3354

The module you need to use is turtle
You cannot replace it by dog ;)

You also mispelled right

You can check a working repl there
https://repl.it/@abc3354/52085

Profile icon
InvisibleOne

The issue is that there isn't a module named dog, are you meaning turtle? like:

import turtle
Profile icon
InvisibleOne

Try doing it on a turtle file or something with an out display