Commit 56b0abac by BellCodeEditor

save project

parent 8abe8ccc
Showing with 13 additions and 10 deletions
......@@ -4,14 +4,17 @@ 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("你输了")
if chuquan in jiqichuquan:
if chuquan==jiqi:
print("平局")
elif chuquan=="石头" and jiqi=="剪刀":
print("你赢了")
elif chuquan=="布" and jiqi=="石头":
print("你赢了")
elif chuquan=="剪刀" and jiqi=="布":
print("你赢了")
else:
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