Commit 18517a02 by BellCodeEditor

save project

parent 8924cdee
Showing with 20 additions and 15 deletions
import random
player=input("请出拳(石头/剪刀/布")
print("玩家出拳",player)
i=["石头","剪刀","布"]
if player in i:
computer=random.choice(i)
print("电脑出拳",computer)
if player==computer:
ptint("平局")
elif (player=="石头" and computer=="剪刀") or (player=="剪刀" and computer=="布") or (player=="布" and computer=="石头"):
print("赢")
else:
print("失败")
else:
print("输入错误")
import turtle
pen=turtle.Pen()
pen.penup()
pen.goto(0,-100)
pen.pendown()
pen.write("efewffwe",font=("Time",30,"normal"))
pen.hideturtle()
pen2=turtle.Pen()
pen2.pencolor('red')
pen2.fillcolor("red")
pen2.begin_fill()
pen2.left(45)
pen2.forward(100)
pen2.circle(50,180)
pen2.right(90)
pen2.circle(50,180)
pen2.forward(100)
pen2.end_fill()
pen2.hideturtle()
turtle.done()
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