Commit ee4dc092 by BellCodeEditor

auto save

parent b8b64e4a
Showing with 24 additions and 3 deletions
# 我们都爱夸夸夸
name=input('请输入创作师的名字:')
print(name+'你是最棒的创造师耶')
\ No newline at end of file
# name=input('请输入创作师的名字:')
# print(name+'你是最棒的创造师耶')
#导入random模块
import random
player=input("请玩家出拳(石头/剪刀/布):")
print("玩家出拳:"+player)
#创建列表
list=['石头','剪刀','布']
#计算机(computer)随机出拳 random.choice()
computer=random.choice(list)
#打印计算机出拳内容
print("计算机出拳:"+computer)
平局
石头 石头 and 剪刀
剪刀 剪刀 石头 and
剪刀 and 石头
if computer==player:
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