Commit 3fc88ae1 by BellCodeEditor

save project

parent d87433bd
Showing with 9 additions and 6 deletions
...@@ -18,9 +18,12 @@ while True: ...@@ -18,9 +18,12 @@ while True:
list11=["石头","剪刀","布"] list11=["石头","剪刀","布"]
cll=random.choice(list11) cll=random.choice(list11)
print("电脑出拳为"+cll) print("电脑出拳为"+cll)
if s==cll: if s in list11:
print("平局!") if s==cll:
elif (s=="石头"and cll=="剪刀" )or(s=="剪刀"and cll=="布") or (s=="布"and cll=="石头"): print("平局!")
print("你赢了!!!") elif (s=="石头"and cll=="剪刀" )or(s=="剪刀"and cll=="布") or (s=="布"and cll=="石头"):
print("你赢了!!!")
else:
print("你输了 !!!")
else: else:
print("你输了 !!!") 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