Hey hey! Happy Monday
Today's problem is to create a function that takes in an array and some integer N. The goal of the function is to return the sum of the N largest integers. Here's an example:
nums = [1,2,3,4,5,6,7,7,7,5] print sum_largest(nums, 4) #7+7+7+6 >> 27
Comments:
Anonymous - 9 years, 6 months ago
reply permalink