Commit c9d39fcb by BellCodeEditor

save project

parent 220fe62b
Showing with 17 additions and 0 deletions
a=input("玩家请出拳")
print("玩家出的是"+a)
import random
linh=["石头","剪刀","布"]
njddi=random.choice(linh)
print("电脑出拳"+njddi)
if a==njddi:
print("平局")
elif a=="石头" and njddi=="剪刀":
print("玩家赢了")
elif a=="剪刀" and njddi=="布":
print("玩家赢了")
elif a=="布" and njddi=="石头":
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