Question: Problem 2: Write a function with the following signature that takes a list L of numbers as argument and returns the largest sum of a

 Problem 2: Write a function with the following signature that takes

Problem 2: Write a function with the following signature that takes a list L of numbers as argument and returns the largest sum of a pair of consecutive numbers in the list. If the list has 0 elements or 1 element, the function should return None. Example: If L=[3,4,2,10,3,12] then all the pairs of consecutive numbers are: (3,4),(4,2),(2,10),(10,3),(3,12) and these pairs have sums 1,2,12,7, and 9 respectively. So your function should return 12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!