Commit 44356b86 by BellCodeEditor

auto save

parent 9b143919
Showing with 37 additions and 6 deletions
if player==computer: import random
player=input("请出拳:石头/剪刀/布")# 玩家出拳
print("玩家出拳:"+player)
#计算机随机出拳
list=['石头','剪刀','布']
computer=random.choice(list)
print('电脑出拳:'+computer)
if player in list:
if player==computer:
print("平局") print("平局")
elif player=="石头"and computer=="剪刀": elif player=="石头"and computer=="剪刀":
print("恭喜,你赢了") print("恭喜,你赢了")
elif player=="剪刀"and computer=="布" elif player=="剪刀" and computer=="布":
print("恭喜,你赢了) print("恭喜,你赢了")
elif player==""and computer=="石头": elif player=="布" and computer=="石头":
print("恭喜你,你赢了") print("恭喜你,你赢了")
else: else:
print("很遗憾,你输了") print("很遗憾,你输了")
else:
print('输入错误')
\ No newline at end of file
list=[99,80,86,89,94,92,75,87,86,95]
list2=sorted(list)
max=list2[-1]
min=list2[0]
list2.pop(0)
list2.pop(-1)
#list2.remove(max)
#list2.remove(min)
sum=0
for i in list2:
sum+=i
a = sum/len(list2)
print('去掉一个最大值:',max,'分,','去掉一个最小值:',min,'分,','最后得分是:',a,'分',sep='')
\ No newline at end of file
dd=['一','二','三','四','五','六','七','八','九']
while True:
a=int(input('请输入1-9数字'))
print(dd[a-1])
\ 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