Commit f6fb9007 by BellCodeEditor

save project

parent af78723d
Showing with 13 additions and 4 deletions
import random
P=input("玩家请出拳(石头.剪刀.布)")
print("玩家选择"+P)
p=input("玩家请出拳(石头.剪刀.布)")
print("玩家选择"+p)
a=["石头","剪刀","布"]
n=random.choice(a)
print("电脑选择"+n)
\ No newline at end of file
print("电脑选择"+n)
if p==n:
print("平局")
elif p=="石头" and n=="剪刀":
print("你赢了")
elif p=="剪刀" and n=="布":
print("你赢了")
elif p=="布" and n=="石头":
print("你赢了")
else
print("你输了")
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