Commit 95731ab1 by BellCodeEditor

save project

parent 4397c990
Showing with 33 additions and 7 deletions
# 玩家出
import random import turtle
a = input('玩家出拳') pen = turtle.Pen()
print("玩家出拳:"+a) pen.goto(0,0)
b = ['剪刀','石头','布'] pen.forward(0)
print("电脑出拳:"+random.choice(b)) pen.fillcolor('yellow')
\ No newline at end of file pen.begin_fill()
for i in range(4):
forward(400)
right(90)
pen.end_fill()
pen.hideturtle()
turtle.done()
import turtle
import random
"""画出五角星,上色"""
pc = input('请输入轮廓色:')
pen=turtle.Pen()
pen.goto(0,0)
pen.forward(0)
pen.pencolor(pc)
pen.fillcolor("red")
pen.begin_fill()
for i in range(5):
pen.forward(100)
pen.right(144)
pen.forward(100)
pen.left(72)
pen.end_fill()
pen.hideturtle()
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