Commit bead3c0d by BellCodeEditor

save project

parent d1e77c10
Showing with 10 additions and 6 deletions
...@@ -4,12 +4,16 @@ import random ...@@ -4,12 +4,16 @@ import random
list=["剪刀","石头","布"] list=["剪刀","石头","布"]
l=random.choice(list) l=random.choice(list)
print("电脑出拳"+l) print("电脑出拳"+l)
if a==l: if a in list:
print("平局") if a==l:
elif (a=="剪刀" and l=="布") or (a=="石头" and l=="剪刀") or (a=="布" and l=="石头"): print("平局")
print("win") elif (a=="剪刀" and l=="布") or (a=="石头" and l=="剪刀") or (a=="布" and l=="石头"):
else : print("win")
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