Commit 01aa74e0 by BellCodeEditor

save project

parent 242751c5
Showing with 8 additions and 11 deletions
...@@ -5,13 +5,10 @@ print("玩家出拳:"+x) ...@@ -5,13 +5,10 @@ print("玩家出拳:"+x)
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
j=random.choice(list) j=random.choice(list)
print("计算机出拳:"+j) print("计算机出拳:"+j)
if x==j: if x in list:
print("平局") if x==j:
elif x=="石头" and j=="剪刀": print("平局")
print("玩家胜利") elif (x=="石头" and j=="剪刀") or (x=="布" and j=="石头") or (x=="剪刀" and j=="布"):
elif x=="剪刀" and j=="布": print("玩家胜利")
print("玩家胜利") else:
elif x=="布" and j=="石头": print("玩家失败")
print("玩家胜利") \ No newline at end of file
else:
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