Commit f8672afc by BellCodeEditor

save project

parent 1747ad4c
Showing with 13 additions and 10 deletions
...@@ -4,13 +4,16 @@ import random ...@@ -4,13 +4,16 @@ import random
cba=["石头","剪刀","布"] cba=["石头","剪刀","布"]
choice=random.choice(cba) choice=random.choice(cba)
print("我出"+choice) print("我出"+choice)
if abc==cba: if abc in list:
prink("平局") if abc==choice:
elif abc=="剪刀" and cba=="布": print("平局")
prink("你赢了") elif abc=="剪刀" and choice=="布":
elif abc=="石头" and cba=="剪刀": print("你赢了")
prink("你赢了") elif abc=="石头" and choice=="剪刀":
elif abc=="布" and cba=="石头": print("你赢了")
prink("你赢了") elif abc=="布" and choice=="石头":
print("你赢了")
else:
print("你输了")
else: else:
prink("你输了") 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