Commit 4c271594 by BellCodeEditor

save project

parent 4f664f6b
Showing with 8 additions and 4 deletions
""" """
请使用turtle模块画出五角星 请使用turtle模块画出五角星
""" """
import turtle import turtle#取出画笔
pen=turtle.Pen() pen=turtle.Pen()
for i in range(5): pen.color("yellow")
pen.fillcolor("red")#使画笔的颜色是红色
pen.begin_fill()
for i in range(5):#重复执行5次画笔移动100步再右转144度
pen.forward(100) pen.forward(100)
pen.right(144) pen.right(144)
turtle.done() pen.end_fill()
\ No newline at end of file turtle.done()#使画布停留
\ No newline at end of file
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