Commit 901e5d2b by BellCodeEditor

save project

parent 220fe62b
Showing with 805 additions and 0 deletions
import random
#玩家出拳
player=input("剪刀/石头/布")
print("玩家出拳:"+player)
#计算机出拳
list=["剪刀","石头","布"]
comp=random.choice(list)
print("计算机出拳:"+comp)
if comp==player:
print("平局")
elif comp=="剪刀" and player=="石头":
print("赢")
elif comp=="石头" and player=="布":
print("赢")
elif comp=="布" and player=="剪刀":
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