Commit a62f03a7 by BellCodeEditor

save project

parent dbbd5aa3
Showing with 10 additions and 4 deletions
import random import random
player=input("玩家出拳") player=input("玩家出拳")
print('玩家出拳'+player) # print('玩家出拳'+player)
a=["剪刀","石头","布"] a=["剪刀","石头","布"]
w=random.choice(a) computer=random.choice(a)
print(w) print(computer)
\ No newline at end of file if player==computer:
print("平局")
elif (player=="石头" and computer=="布") or (player=="布" and computer=="剪刀") or (player=="剪刀" and computer=="石头"):
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