current position:Home>Find the sum of the largest and the smallest of the three numbers. Requirements: write three functions; A function to find the maximum number of three numbers; Another function is to find the smallest of the three numbers; The third function calls the fir

Find the sum of the largest and the smallest of the three numbers. Requirements: write three functions; A function to find the maximum number of three numbers; Another function is to find the smallest of the three numbers; The third function calls the fir

2022-01-27 00:18:07 CSDN Q & A

Find the sum of the largest and the smallest of the three numbers . requirement : Write three functions ; A function to achieve 3 The largest of the numbers ; Another function is to find 3 Minimum number ; The first 3 A function calls the first two functions , Realize the sum of the maximum number and the minimum number .




Refer to the answer 1:
def maxs(ls):    print(' Maximum ',max(ls))    return int(max(ls))def mins(ls):    print(' minimum value ',min(ls))    return int(min(ls))def avgs(ls):    maxs1=maxs(ls)    mins1=mins(ls)    print(' Max min sum ',maxs1+mins1)avgs([1,2,5])



Refer to the answer 2:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/01/202201270018058566.html

Random recommended