Commit 8477b4f8 by BellCodeEditor

auto save

parent ec4730e2
Showing with 33 additions and 0 deletions
player=input("请问您要出石头/")
\ No newline at end of file
import turtle
c="red"
color=input("你想要什么颜色的五角星")
#定义函数 def 函数名(参数):
def star(c):
pen=turtle.Pen()
pen.fillcolor(c)
pen.begin_fill()
for i in range(5):
pen.forward(100)
pen.right(144)
pen.hideturtle()
pen.end_fill()
turtle.done()
if color=="red":
c="red"
#调用函数
star(c)
if color=="yellow":
c="yellow"
star(c)
if color=="black"
c="black"
star(c)
\ 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