九州体育网 - 十年信誉网站

关于作者

Discuss / Python / 一直在报错是为啥

一直在报错是为啥

Topic source

西山脚

#1 Created at ...
PS D:\codeHeaven\python> python .\turtle.py
Traceback (most recent call last):
  File ".\turtle.py", line 2, in <module>
    from turtle import *
  File "D:\codeHeaven\python\turtle.py", line 5, in <module>
    width(4)
NameError: name 'width' is not defined

第二个报错还勉强可以看懂,第一个完全找不到头绪,turtle也装置了

西山脚

#2 Created at ...

自己把坑填上,千万不要把文件名取名叫 turtle 。。。

祁佚

#3 Created at ...

我和你一样。。。哈哈 命名不能叫 turtle.py,否则要报错啊


  • 1

Reply

WARNING: You are using an old browser that does not support HTML5. Please choose a modern browser (Chrome / Microsoft Edge / Firefox / Sarafi) to get a good experience.