Commit dd6c67e7 by BellCodeEditor

save project

parent e6030dac
Showing with 10 additions and 4 deletions
# 玩家出拳 # 玩家出拳
player = input("请输入你的手势,石头、剪刀、布:") was = input("请输入你的手势,石头、剪刀、布:")
print("玩家出拳," + player) print("玩家出拳," + was)
rtwg = ["石头","剪刀","布"] rtwg = ["石头","剪刀","布"]
import random import random
wsa = random.choice(rtwg) wsa = random.choice(rtwg)
print("计算机出拳," + wsa) print("计算机出拳," + wsa)
\ No newline at end of file if was == wsa:
print("平局")
elif (was == "剪刀" and wsa == "布") or (was == "石头" and wsa == "剪刀") or (was == "布" and wsa == "石头"):
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