注册 登录
编程论坛 Python论坛

python不能画图,是咋回事?

greenpop 发布于 2022-06-11 15:39, 1149 次点击
程序代码:
>>> import turtle as t
Traceback (most recent call last):
  File "<pyshell#3>", line 1, in <module>
    import turtle as t
  File "E:\zwg\pythonst\turtle.py", line 20, in <module>
    move(0, 100)
  File "E:\zwg\pythonst\turtle.py", line 6, in move
    turtle.penup()
AttributeError: 'module' object has no attribute 'penup'
1 回复
#2
古1232022-06-12 07:36
你不是将turtle导入别称为t了吗?
试试t.penup()
1