使用Python turtle库画小猪佩奇
使用turtle画小猪佩奇from turtle import*speed(10)def nose(x,y):#鼻子 penup()#提起笔 goto(x,y)#定位 pendown()#落笔,开始画 setheading(-30)#将乌龟的方向设置为to_angle/为数字(0-东、90-北、180-西、270-南) begin_fill()#准备开始填充图形 a=0.4 for i in range(120): if 0<
原创
2022-02-25 11:10:59 ·
493 阅读 ·
0 评论