Commit 0821e7f3 by BellCodeEditor

save project

parent 03298cac
Showing with 9 additions and 6 deletions
......@@ -6,11 +6,13 @@ import random
cba=["石头","剪刀","布"]
swq=random.choice(cba)
print(swq)
if abc==swq:
print("平局")
elif (abc=="石头" and swq=="剪刀") or (abc=="剪刀" and swq=="布") or (abc=="布" and swq=="石头"):
print("你赢了")
if abc in cba:
if abc==swq:
print("平局")
elif (abc=="石头" and swq=="剪刀") or (abc=="剪刀" and swq=="布") or (abc=="布" and swq=="石头"):
print("你赢了")
else:
print("你输了")
else:
print("你输了")
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