Commit f7c3d8a6 by BellCodeEditor

save project

parent 33dfa747
Showing with 13 additions and 2 deletions
player=input("请出拳(石头/剪刀/布):")# 玩家出拳
print("玩家出拳:"+player)
pl=input("请出拳(石头/剪刀/布):")# 玩家出拳
print("玩家出拳:" + pl)
import random
e=["石头","剪刀","布"]
cu=random.choice(e)
print("计算机出拳:" + cu)
if pl==cu:
print("平局")
elif pl=="石头" and cu=="剪刀":
print("玩家赢")
elif pl=="剪刀" and cu=="布":
print("玩家赢")
elif pl=="布" and cu=="石头":
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