Commit ca4614ad by BellCodeEditor

save project

parent 23dfff73
Showing with 17 additions and 0 deletions
import random
player = input("请出拳:")
cn = ["剪刀","石头","布"]
cn1 = random.choice(cn)
if player in cn :
if player == "剪刀" and cn1 == "布" or player == "石头" and cn1 == "剪刀" or player == "布" and cn1 == "石头" :
print("玩家获胜!")
elif player == cn1 :
print("平局!")
else :
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