Commit 2a9d6b47 by BellCodeEditor

auto save

parent c3ff8491
Showing with 18 additions and 3 deletions
# 玩家出拳 # 玩家出拳
出拳 = input('请输入石头/剪刀/布') palyer = input('请输入石头/剪刀/布')
print("玩家出拳") print("玩家出拳:"+palyer)
print(出拳) # 电脑出拳
import random
list = ['剪刀','石头','布']
computer = random.choice(list)
print("电脑出拳:"+computer)
if computer == "剪刀" and palyer =="布":
print("抱歉!电脑获胜")
if computer == "石头" and palyer == "剪刀":
print("抱歉!电脑获胜")
if computer == "布" and palyer == "石头":
print("抱歉!电脑获胜")
if computer == palyer:
print("打平,从新开始")
else:
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