Commit bed0aa06 by BellCodeEditor

save project

parent 342233ec
Showing with 15 additions and 14 deletions
qwe=input("玩家请出拳石头/剪刀/布:") qwe=input("玩家请出拳石头/剪刀/布:")
print("玩家出拳:"+qwe) print("玩家出拳:"+qwe)
import random if qwer in q:
q=["石头","剪刀","布"] import random
qwer=random.choice(q) q=["石头","剪刀","布"]
print("机器出拳:",qwer) qwer=random.choice(q)
if qwe==qwer: print("机器出拳:",qwer)
print("平局") if qwe==qwer:
elif qwe("石头")==qwer("剪刀"): print("平局")
print("太棒了,你赢了!") elif (qwe=="石头" and qwer=="剪刀"):
elif qwe("剪刀")==qwer("布"): print("太棒了,你赢了!")
print("太棒了,你赢了!") elif (qwe=="布" and qwer=="石头"):
elif qwe("布")==qwer("石头"): print("太棒了,你赢了!")
print("太棒了,你赢了!") else:
print("还要继续努力哦!")
else: else:
print("还要继续努力哦!") print("输错了哦!")
\ No newline at end of file \ 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