python用小海龟画小汽车
import turtle x=turtle.Turtle() x.shape(‘turtle’) x.color(‘red’) x.begin_fill() x.forward(200) x.right(90) x.forward(100) x.left(90) x.forward(200) x.right(90) x.forward(100) x.right(90) x.forward(400) x.right(90) x.forward(200) x.end_fill() x.right(180) x.forward(200) x.penup() x.forward(100) x.left(90) x.forward(100) x.pendown() x.color(‘black’) x.begin_fill() x.circle(60) x.end_fill() x.penup() x.forward(200) x.pendown() x.begin_fill() x.circle(60) x.end_fill() turtle.exitonclick() ![在这里插入图片描述](https://img-blog.csdnimg.cn/20200908202602382.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQ1OTM4MzQx,size_16,color_FFFFFF,t_70#pic_center)
|