Commit 3db39007 by BellCodeEditor

save project

parent a0cbfb52
Showing with 14 additions and 2 deletions
# 玩家出拳
\ No newline at end of file
# 玩家出拳
import random
p=input("请出拳(石头/剪刀/布)")
print("玩家出拳:"+p)
c=["石头","布","剪刀"]
n=random.choice(c)
print("计算机出拳:"+n)
if p==n:
print("平局")
elif (p=="石头"and n=="剪刀") or (p=="布"and n=="石头") or (p=="剪刀"and n=="布")
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