Question: *Python* Write and test a program to accept list of numbers from user. The program will have a function to calculate the square of each
*Python*
Write and test a program to accept list of numbers from user. The program will have a function to calculate the square of each number in the list and a list containing the square of each number in the list and a function to calculate and return the sum for all the numbers in the list
squareEach(nums) is a function that modifies the list by squaring each entry and returns the list of squares for each number in the list, nums is a list of numbers
sumList(nums) is a function to sum numbers in a list and return the sum; nums is a list of numbers
Remember that squaring a number means multiplying it by itself so if I pass you a 7, you need to return it as a 49 (7*7)
Test your program with a sequence holding 1,2,3,4,5,6,7,8 and returning a sequence 1,4,9,16,25,35,49,64
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
