Commit 02eaee8c by BellCodeEditor

save project

parent 23dfff73
Showing with 31 additions and 0 deletions
# 玩家出拳
from random import choice
print("。。。。。。。。。。。。。。。。。。。。开始游戏。。。。。。。。。。。。。。。。。。。。")
p=input("请出拳(石头、剪刀、布)")
print("玩家出了:"+p)
sss=["石头","剪刀","布","石头","剪刀","布"]
r=choice(sss)
print("电脑出了:"+r)
if p=="石头":
if r=="石头":
print("平局")
elif r=="剪刀":
print("电脑输了")
elif r=="布":
print("玩家输了")
elif p=="剪刀":
if r=="石头":
print("玩家输了")
elif r=="剪刀":
print("平局")
elif r=="布":
print("电脑输了")
elif p=="布":
if r=="石头":
print("电脑输了")
elif r=="剪刀":
print("玩家输了")
elif r=="布":
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