Question: Sample list programs Write a function called negate(myList) which takes in a list of numbers as a parameter and negates each value in the list.

Sample list programs Write a function called negate(myList) which takes in a list of numbers as a parameter and negates each value in the list. Since the function changes the list provided as a parameter it does not need to return anything Write a function called negativeCopy(myList), which takes in a list of numbers as a parameter and returns a newly created list, which is, contains the negative values of the original list. For example, For example, negativeCopy(1 -2, 3.5 4.2,] ) would return [-1, 2, -3.5, -4.2] Write a function called addList(myList, addend), which takes in a list of numbers and a single addend as parameters. The function returns a newly created list, which is each number in the original list plus, the addend. For example addList 1,2,3.5,4.2], 3) would return [4, 5, 6.5, 7.2]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
