PyCharm Python无法引入turtle是为啥?
源代码如下:
from turtle import *
speed (1000)
pensize (2)
colormode (255)
bgcolor (230,230,230)
penup ()
goto (-200,-200)
pendown ()
for i in range (8):
for j in range (8):
if ( i + j )%2==0:
fillcolor ("black")
else:
fillcolor ("white")
begin_fill ()
for k in range (4):
forward (50)
left (90)
end_fill()
forward (50)
penup()
goto(-200,-200+50* i +50)
pendown ()
#写字
write ("国际象棋棋盘", font =("隶书",30,"normal "))