Commit e796767d by BellCodeEditor

save project

parent ea66d443
Showing with 13 additions and 14 deletions
"""
使用turtle模块
尝试让画笔重复移动36次,
每次移动200步,旋转170度,
看看能画出什么图像吧!并尝试给它填充颜色
"""
import turtle import turtle
turtle.setup(500,500) pen =turtle.Pen()
turtle.pensize(7) pen.fillcolor("red")
turtle.pencolor("yellow") pen.begin_fill()
turtle.fillcolor("red") for i in range(36):
turtle.penup() pen.forward(200)
turtle.goto(-120,50) pen.right(170)
turtle.pendown() pen.end_fill()
turtle.begin_fill()
for i in range(5):
turtle.fd(100)
turtle.left(72)
turtle.fd(100)
turtle.right(144)
turtle.end_fill()
turtle.done() turtle.done()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment