利用Python绘制出一条会动的蟒蛇
绘制一条“蟒蛇” 使用Python绘制一条会动的“蟒蛇” 代码实现: import turtle #若使用from turtle import * 则下方函数名前可不加 turtle. import time def drawSnake(rad,angle,len,neckrad): for i in range(len): turtle.circle(rad,angle) turtle.circle(-rad,angle) turtle.circle(rad,angle/2) turtle.fd(rad) turtle.circle(neckrad+1,180) tur
用户评论