前言
大家好,我是BoBo仔。今天,我来教大家如何画一个单色风车
源码
源码如下:
import turtle as t
t.goto(0,0)
for s in range(1,5):
t.forward(50)
t.right(90)
t.forward(250)
t.left(90)
t.forward(75)
t.left(90)
t.forward(150)
t.left(90)
t.forward(75)
t.goto(0,0)
t.setheading(270)
t.forward(250)
t.left(90)
t.forward(75)
t.left(90)
t.forward(150)
t.left(90)
t.forward(75)
t.goto(0,0)
t.setheading(90)
t.forward(250)
t.left(90)
t.forward(75)
t.left(90)
t.forward(150)
t.left(90)
t.forward(75)
t.goto(0,0)
t.setheading(180)
t.forward(250)
t.left(90)
t.forward(75)
t.left(90)
t.forward(150)
t.left(90)
t.forward(75)
t.done()
你学会了吗?别忘了留下关注哟!