Commit bed0aa06 by BellCodeEditor

save project

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