Question: Language is Python 3.6 Function name: add_next Parameters: aList (a list of integers) Return value: None Description: Overwrite each element in aList with its value

Language is Python 3.6
Function name: add_next Parameters: aList (a list of integers) Return value: None Description: Overwrite each element in aList with its value added with the value of the next element in the list. The last element on the list (or if there is only one element in the list) should be added to itself. Note: Be aware that we are asking you to change the list in place, that is we are not asking you to return a new list with the modified changes, we want you to override the list we provide as an argument. Read this for more info and help: http:/linteractivepython.org/runestone/static/thinkcspy/Lists/UsingListsasParameters.html Authors: Soni Aggarwal and Christine Feng Report Issues: [soni@gatech.edu or christinefeng@gatech.edu ] HOMEWORK 04: LISTS 6 Test Cases: >>> things = [2, 5, 9] >>> add_next(things) >>> print(things) [7, 14, 18] >>> things2 = [3] >>> add_next(things2) >>> print(things2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
