Commit b3fca0e7 by BellCodeEditor

auto save

parent 7d1a6665
Showing with 18 additions and 2 deletions
# 我们都爱夸夸夸
\ No newline at end of file
import random
import turtle
color=input("请选择颜色")
list=("3","4","5","6","7")
X=random.choice(list)
print("为你选择",color+"的"+X+"边形")
Y=int(X)
pen=turtle.Pen()
pen.fillcolor(color)
pen.begin_fill()
for i in range(Y):
pen.forward(100)
pen.right(180-180*(Y-2)/Y)
pen.end_fill()
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