Commit cc96900a by BellCodeEditor

save project

parent b5c6bbbe
Showing with 28 additions and 0 deletions
import random
player = input("石头/剪刀/布")
print("玩家出拳" + player)
list = ["剪刀","石头","布"]
name = random.choice(list)
print("计算机出" + name)
if(player != "剪刀"or player != "石头"or player != "布"):
print("错误")
else:
if(player == name):
print("平局")
elif(name == "剪刀"):
if(player == "布"):
print("计算机获胜")
elif(player == "石头"):
print("玩家获胜")
elif(name == "石头"):
if(player == "布"):
print("玩家获胜")
elif(player == "剪刀"):
print("计算机获胜")
elif(name == "布"):
if(player == "剪刀"):
print("玩家获胜")
if(player == "石头"):
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