Commit 2e8de007 by BellCodeEditor

save project

parent 9fd5a5ed
Showing with 8 additions and 2 deletions
...@@ -3,4 +3,11 @@ print("玩家出:"+player) ...@@ -3,4 +3,11 @@ print("玩家出:"+player)
import random import random
abc=["石头","剪刀","布"] abc=["石头","剪刀","布"]
abcd=random.choice(abc) abcd=random.choice(abc)
print("计算机:"+abcd) print("计算机:"+abcd)
\ No newline at end of file if player==abcd
print("平局")
elif (player=="石头" and abcd=="剪刀") or (player=="布" and abcd=="石头") or (player=="剪刀" and abcd=="布"):
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