Commit 48336191 by BellCodeEditor

auto save

parent c0b5d117
Showing with 16 additions and 0 deletions
wanjia = input("请出拳(石头/剪刀/布):")
import random
list=["石头","剪刀","布"]
jisuanji=random.choice(list)
if wanjia in list:
print("玩家出拳:" + wanjia)
print("计算机出拳为:"+jisuanji)
if (wanjia=="石头" and jisuanji=="剪刀") or (wanjia=="布" and jisuanji=="石头") or (wanjia=="剪刀" and jisuanji=="布"):
print("恭喜你胜利啦!")
elif wanjia==jisuanji:
print("平局哦")
else:
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