Commit 4acf55c6 by BellCodeEditor

save project

parent 56a886ba
Showing with 15 additions and 1 deletions
r=input("玩家出拳(石头/剪刀/布):")
print("玩家出拳是:"+r)
import random
list=["石头","剪刀","布"]
j=random.choice(list)
print("电脑出拳是:"+j)
if r in list:
if r==j:
print("平局")
elif((r=="石头"and j=="剪刀")or(r=="剪刀"and j=="布")or(r=="布"and j=="石头")):
print("胜利")
else:
print("失败")
else:
print("输入错误")
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