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-26 23:55:34 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:

Useful, please adopt

def getMax(nums):    return max(nums)def getMin(nums):    return min(nums)def getSum(nums):    return getMax(nums) + getMin(nums)nums = [4, 6, 8]print(getSum(nums))



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/202201262355324175.html

Random recommended