Commit 7548a249 by BellCodeEditor

save project

parent 23dfff73
Showing with 17 additions and 0 deletions
chuquan=input("玩家出拳(石头/剪刀/布):")
print("玩家出拳:"+chuquan)
import random
jiqichuquan=["剪刀","石头","布"]
jiqi=random.choice(jiqichuquan)
print("机器出拳:"+jiqi)
if chuquan==jiqi:
print("平局")
elif chuquan=="石头" and jiqi=="剪刀":
print("你赢了")
elif chuquan=="布" and jiqi=="石头":
print("你赢了")
elif chuquan=="剪刀" and jiqi=="布":
print("你赢了")
else:
print("你输了")
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