Commit 23612a61 by BellCodeEditor

auto save

parent 9e6ab6b9
Showing with 12 additions and 4 deletions
# 玩家出拳
player = input("请玩家出拳:剪刀/石头/布")
import random
list=["剪刀","石头","布"]
player2=random.choice(list)
print("电脑出" + player2)
\ No newline at end of file
list = ["石头","剪刀","布"]
player2 = random.choice(list)
print("电脑出" + player2)
if player == player2:
print("平局")
elif player == "石头" and player2 == "剪刀":
print("玩家赢")
elif player == "剪刀" and player2 == "布":
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