Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I will give upvote! please use python 3 to answer Maximum Triplet Sum Description Please calculate the sum of the 3 largest numbers in the
I will give upvote! please use python 3 to answer
Maximum Triplet Sum Description Please calculate the sum of the 3 largest numbers in the list, if there are the same numbers, only calculate once . Complete a function:, max_tri_sum(numbers) contains 1 parameter, numbers: List of integer numbers, numbers include positive, negative, and 0. Example: [3,2,6,8,2,3] 8+6+3=17 [2,1,8,0,6,4,8,6,2,4] 8+6+4=18 Input No input required The system will automatically bring the value numbers in Output returnThe sum of the 3 largest numbers in the list Just return, no print needed Sample Input 1 Sample Output 1 The system will automatically pass in the parameters, you don't need to read the parameters yourself [3,2,6,8,2,3] The system will automatically call the function without outputting by yourse If 17 Sample Input 2 Sample Output 2 The system will automatically pass in the parameters, you don't need to read the parameters yourself [2, 1,8,9,6,4,8,6,2,4] The system will automatically call the function without outputting by yourse if 18 Hint example: To test whether you have written correctly in viscode print(max_tri_sum (13,2,6,8,2,3])) Output is 17 Rule accurate [3,2,6,8.2.3) can be changed to the list you set to testStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started