Commit 80fe6a92 by BellCodeEditor

auto save

parent c20f0945
Showing with 21 additions and 0 deletions
"""
使用for循环嵌套 通过画20个正方形 画出太阳花
"""
import turtle
pen = turtle.Pen()
pen.pencolor("orange")
pen.fillcolor("yellow")
pen.begin_fill()
for i in range(20):
for j in range(4):
pen.forward(100)
pen.left(90)
#每次画完正方形调整画笔角度以免重复
pen.left(18)
pen.end_fill()
pen.hideturtle()
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