Commit 2560b0b7 by BellCodeEditor

save project

parent 562a9be3
Showing with 4 additions and 3 deletions
player=input("s/b/x") player=input("剪刀/石头/布")
print("玩家"+player)# 玩家出拳 print("玩家"+player)# 玩家出拳
import random import random
list=["s","b","x"] list=["剪刀","石头","布"]
computer=random.choice(list) computer=random.choice(list)
print(computer) print(computer)
if piayer==computer: if piayer==computer:
print("平局") print("平局")
elif (piayer=="s"and computer=="x" or(piayer=="b"and computer=="x" or(player=="b"and computer=="s") elif (piayer=="剪刀"and computer=="布" or(piayer=="石头"and computer=="剪刀" or(player=="布"and computer=="剪刀")
print(你赢了) print(你赢了)
eise: eise:
print(你输了) 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