Commit d81f3f7c by BellCodeEditor

save project

parent b049e005
Showing with 14 additions and 11 deletions
# 玩家出拳
you=input("玩家出拳(石头/剪刀/布):")
print("玩家出拳:"+you)
#机器出拳
import random
list=["石头","剪刀","布"]
xi=random.choice(list)
print("机器出拳:"+xi)
if you==xi:
print("平局")
elif you=="石头" and xi=="剪刀":
print("恭喜,你赢了")
elif you=="剪刀" and xi=="布":
print("恭喜,你赢了")
elif you=="布" and xi=="石头":
print("恭喜,你赢了")
if you in list:
if you==xi:
print("平局")
elif you=="石头" and xi=="剪刀":
print("恭喜,你赢了")
elif you=="剪刀" and xi=="布":
print("恭喜,你赢了")
elif you=="布" and xi=="石头":
print("恭喜,你赢了")
else:
print("抱歉,你输了")
else:
print("抱歉,你输了")
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