Commit ba3d3743 by BellCodeEditor

save project

parent 84d8fa97
Showing with 3 additions and 4 deletions
import random import random
player=input("请出拳:石头/剪刀/布")# 玩家出拳 player=input("请出拳:石头/剪刀/布")# 玩家出拳
print("玩家出拳:"+player) print("玩家出拳:"+player)
list=["剪刀""石头""布"] list=["剪刀","石头","布"]
j=random.choice(list) j=random.choice(list)
print(j) print(j)
if player==j: if player==j:
...@@ -9,9 +9,8 @@ if player==j: ...@@ -9,9 +9,8 @@ if player==j:
if player=="剪刀": if player=="剪刀":
if j=="石头": if j=="石头":
print("你输了") print("你输了")
if player=="剪刀":
if j=="布": if j=="布":
print("你赢了") print("你赢了")
if player=="石头": if player=="石头":
if j=="剪刀": if j=="剪刀":
print("你赢了") print("你赢了")
...@@ -20,7 +19,7 @@ if player=="石头": ...@@ -20,7 +19,7 @@ if player=="石头":
if player=="布": if player=="布":
if j=="剪刀": if j=="剪刀":
print("你输了") print("你输了")
if j=="": if j=="石头":
print("你赢了") 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