Commit 8942a38d by BellCodeEditor

auto save

parent 59aabf67
Showing with 13 additions and 14 deletions
import turtle
pen=turtle.pen()
turtle.bgcolor("black")
A=7
colors=["red","grange","yellow","green","blue","porple","cyan"]
for i in range(100):
pen.pencolor(colors[i%A])
pen.forward(i+2)
pen.left(360%A+2)
turtle.done()
\ No newline at end of file
"""
请使用turtle模块画出五角星
"""
import turtle
pen=turtle.Pen()
pen.fillcolor("red")
pen.begin_fill()
pen.shape("turtle")
for i in range(36):
pen.forward(200)
pen.left(170)
pen.hideturtle()
pen.end_fill()
turtle.done()
i
\ 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