Commit c84dc40f by BellCodeEditor

save project

parent 220fe62b
Showing with 24 additions and 0 deletions
# 玩家出
p=input("玩家请出拳:")
print("玩家出拳:"+p)
import random
listl=["石头","剪刀","布"]
r=random.choice(listl)
print("计算机出拳:"+r)
if p==r:
print("平局了")
elif p=="石头" and r=="剪刀":
print("赢了")
elif p=="布" and r=="石头":
print("赢了")
elif p=="剪刀" and r=="布":
print("赢了")
elif p=="布" and r=="剪刀":
print("输了")
elif p=="石头" and r=="布":
print("输了")
elif p=="剪刀" and r=="石头":
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