我认为这个问题很普遍,但是尝试搜索答案,但没有任何效果。所以现在我在这里问你们。所以当我在下面编写代码
import turtle
t = turtle.Pen()
for x in range(random_number):
t.forward(x)
t.left(random_number)
并按F5运行它总是显示此错误:
Traceback (most recent call last):
File "C:/Users/User/AppData/Local/Programs/Python/Python37-32/ss.py", line 1, in <module>
import turtle
File "C:/Users/User/AppData/Local/Programs/Python/Python37-32\turtle.py", line 2, in <module>
t = turtle.Pen()
AttributeError: module 'turtle' has no attribute 'Pen'
而且我目前正在使用Win7和python v3.7.0,所以请帮我。