Commit b6243544 by BellCodeEditor

save project

parent cb27a25e
Showing with 19 additions and 1 deletions
......@@ -3,5 +3,22 @@ player = input("石头/剪刀/布")
print("玩家出拳" + player)
list = ["剪刀","石头","布"]
name = random.choice(list)
print("计算机出拳" + name)
print("计算机出" + name)
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