Commit 27aba96e by BellCodeEditor

save project

parent a6c3c929
Showing with 22 additions and 2 deletions
...@@ -3,4 +3,25 @@ player=input("请出拳:石头/剪刀/布") ...@@ -3,4 +3,25 @@ player=input("请出拳:石头/剪刀/布")
print("玩家出拳:"+player) print("玩家出拳:"+player)
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
jiqiren=random.choice(list) jiqiren=random.choice(list)
print("机器人出拳:"+jiqiren) print("机器人出拳:"+jiqiren)
\ No newline at end of file if player==" 石头":
if jiqiren=="石头":
print("平局")
if jiqiren=="剪刀":
print("你赢了")
if jiqiren=="布":
print("你输了")
if player==" 剪刀":
if jiqiren=="石头":
print("你输了")
if jiqiren=="剪刀":
print("平局")
if jiqiren=="布":
print("你赢了")
if player==" 布":
if jiqiren=="石头":
print("你赢了")
if jiqiren=="剪刀":
print("你输了")
if jiqiren=="布":
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