Ask coding questions

← Back to all posts
I'm getting an Import Error in the code
Hero2207 (0)

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

Comments
hotnewtop
Coder100 (18109)

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.
abc3354 (228)

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

InvisibleOne (2953)

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

import turtle
InvisibleOne (2953)

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