liujun9530


私信TA

用户名:liujun9530

访问量:1806

签 名:

等  级
排  名 5030
经  验 1541
参赛次数 0
文章发表 17
年  龄 0
在职情况 学生
学  校 成都理工大学
专  业

  自我简介:

TA的其他文章


参考代码:

def fun_1(ls):  # 输入10个数
   ls = list(map(int, input().split()))
   return ls


def fun_2(ls):  # 进行处理
   my_min = min(ls)
   my_index = ls.index(my_min)
   temp = ls[0]
   ls[0] = ls[my_index]
   ls[my_index] = temp

   my_max = max(ls)
   my_new_index = ls.index(my_max)
   new_temp = ls[-1]
   ls[-1] = ls[my_new_index]
   ls[my_new_index] = new_temp

   return ls


def fun_3(ls):  # 输出10个数
   for i in range(10):
       print(ls[i], end=" ")


ls = []
rel = fun_1(ls)
new_rel = fun_2(rel)
fun_3(new_rel)

 

0.0分

0 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区