Commit 3f99817d by BellCodeEditor

save project

parent e884057c
Showing with 9 additions and 2 deletions
...@@ -3,4 +3,12 @@ player = input("请玩家出拳:") ...@@ -3,4 +3,12 @@ player = input("请玩家出拳:")
print("玩家出:"+player) print("玩家出:"+player)
list4 = ["石头","剪刀","布"] list4 = ["石头","剪刀","布"]
turle = random.choice(list4) turle = random.choice(list4)
print("计算机出:"+turle) print("计算机出:"+turle)
\ No newline at end of file if player == "石头" and turle == "剪刀":
print("玩家赢")
elif player == "剪刀" and turle == "布":
print("玩家赢")
elif player == "布" and turle == "石头":
print("玩家赢")
elif player == turle:
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