Commit 32a62416 by BellCodeEditor

save project

parent 4bf96db7
Showing with 9 additions and 2 deletions
...@@ -5,4 +5,11 @@ print("玩家出拳:"+player) ...@@ -5,4 +5,11 @@ print("玩家出拳:"+player)
#计算机出拳 #计算机出拳
list001 = ["石头","剪刀","布"] list001 = ["石头","剪刀","布"]
list002 = r.choice(list001) list002 = r.choice(list001)
print("计算机出拳:"+list002) print("计算机出拳:"+list002)
\ No newline at end of file if player==list002
print("平局")
elif (player == "剪刀"and list002 == "布")or(player == "石头"and list002 == "剪刀"):
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