python海龟名称错误:未定义形状

2024-04-18 08:20:09 发布

您现在位置:Python中文网/ 问答频道 /正文

当我尝试在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无法重新确定形状。
请帮帮我


Tags: 代码fromimportmostosmac错误pi