【发布时间】:2020-10-17 23:02:14
【问题描述】:
当我在 Mac os 中尝试使用 python 3.8.3 这段代码:
from turtle import *
shape("turtle")
我收到此错误:
Traceback (most recent call last):
File "C:\Users\jeeva\Desktop\Tanmay_new\python\pi\Draw_pi\draw_pi.pyw", line 2, in <module>
shape("turtle")
NameError: name 'shape' is not defined
看起来 python 不能重新调整形状。
请帮帮我。
【问题讨论】:
-
你试过使用 shape=('turtle')
-
感谢您的建议,但它会将一个名为 shape 的变量设置为 'turtle' 的值。
标签: python macos turtle-graphics python-3.8 python-turtle