Commit 7cfc26f1 by BellCodeEditor

save project

parent c556f56f
Showing with 12 additions and 9 deletions
...@@ -5,16 +5,19 @@ print("玩家出拳:"+c) ...@@ -5,16 +5,19 @@ print("玩家出拳:"+c)
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
j=random.choice(list) j=random.choice(list)
print("计算计出拳:"+j) print("计算计出拳:"+j)
if c==j: if c in list:
print("平局") if c==j:
elif c=="石头" and j=="剪刀": print("平局")
print("win") elif c=="石头" and j=="剪刀":
elif c=="剪刀" and j=="布": print("win")
print("win") elif c=="剪刀" and j=="布":
elif c=="布" and j=="石头": print("win")
print("win") elif c=="布" and j=="石头":
print("win")
else:
print("lose")
else: else:
print("lose") print("no")
......
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