import turtle def drawSnake(rad,angle,len,nackrad): for i in range(len): turtle.circle(rad,angle) #画圆,参数分别是半径和角度 turtle.circle(-rad,angle) #半径为负,反方向画圆 turtle.circle(rad,angle/2) turtle.fd(rad) #fd函数表示直线爬行,rad表明爬行距离 turtle.circle(nackrad+1,180) turtle