Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribed

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 test

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

More Books

Students also viewed these Databases questions

Question

Identify the elements that make up the employee reward package.

Answered: 1 week ago

Question

Understand the purpose, value and drawbacks of the interview.

Answered: 1 week ago