0
Modules in Python
I wanted to draw a turtle on my laptop, wrote everything to make it move, for example, forward and launched it. As a result, in the terminal (Visual Studio Code) it is written that some module is being redefined. Can you tell me what the problem is?
7 Respostas
+ 6
And where is this code you talk about? can you provide a link to it? Needless to say, without any code review it will all be like shooting blanks.
Just add a link to it, at least a portion of it which triggered that error...
+ 3
как называется твой код?
+ 2
I don't have the code. It’s just that if I write import tertle, I get an error. Why should I just write to you import turtle? There's a mistake here. He writes that this module is being redefined. That's the problem
Ipang
+ 1
@Wolf Cub
In original post you wrote
"I wanted to draw a turtle on my laptop, wrote everything to make it move, for example, forward and launched it."
That's why I asked you to add your code link earlier. You wrote (in original post) that you had written everything to make it move. Thus I presumed you already have the code.
If `import turtle` was the only line in the code; and it triggers error, perhaps you should reinstall turtle module?
https://marketplace.visualstudio.com/items?itemName=oxfordturtle.turtle-vscode
Don't save your code using a module name i.e. turtle.py. Use another name.
+ 1
PASHA 🇷🇺 , у меня его нет в Sololearn.
Код:
1 import turtle
2
3 t=turtle.Turtle()
4 t.fd(100)
Проблема:
3 строка: Переопределяется модуль "turtle"
+ 1
Ipang Okay, i will try it tomorrow.
0
PASHA 🇷🇺 сорян что отвлекаю, но практически никто мою проблему не понимает. У меня такая проблема, что в VSC я импортирую черепашку, в итоге в окне проблем пишет, что черепашка переопределяется. Может ты и не VSC используешь.