Commit 025f39db by BellCodeEditor

save project

parent 6dc6d6ae
Showing with 4 additions and 0 deletions
...@@ -4,6 +4,7 @@ print("玩家出拳:"+player) ...@@ -4,6 +4,7 @@ print("玩家出拳:"+player)
list =["石头,剪刀,布"] list =["石头,剪刀,布"]
a = random.choice(list) a = random.choice(list)
print("电脑出拳:"+list) print("电脑出拳:"+list)
if player in list:
if player==computer: if player==computer:
player("平局") player("平局")
elif player=="石头"and a=="剪刀": elif player=="石头"and a=="剪刀":
...@@ -14,3 +15,5 @@ elif player=="布"and a=="石头": ...@@ -14,3 +15,5 @@ elif player=="布"and a=="石头":
print("你赢了") print("你赢了")
else: else:
print("你输了") print("你输了")
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