Commit b9bf699b by BellCodeEditor

save project

parent 8bd14413
Showing with 12 additions and 2 deletions
...@@ -3,4 +3,14 @@ play=input("请出拳:石头/剪刀/布") ...@@ -3,4 +3,14 @@ play=input("请出拳:石头/剪刀/布")
print("玩家出拳"+play) print("玩家出拳"+play)
SB=["石头","剪刀","布"] SB=["石头","剪刀","布"]
BT=random.choice(SB) BT=random.choice(SB)
print("计算机出拳:"+BT) print("计算机出拳:"+BT)
\ No newline at end of file if play==BT:
print("平局")
elif play=="石头"and BT=="剪刀":
print("恭喜,你赢了")
elif play=="剪刀" and BT=="布":
print("恭喜,你赢了")
elif play=="布" and BT=="石头":
print("恭喜,你赢了")
else:
print("很遗憾,你输了")
\ 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