Implement Square and Sum of the Numbers in Python



Write a program that will accept a list of numbers from the user. Write and test two functions to meet the following specifications:
squareEach(nums), nums is a list of numbers, returns a list of the square of each number in the list
sumList(nums), nums is a list of numbers, returns the sum of the numbers in the list
Print the original list, the list of squared values and the sum of the list.
This assignment includes python program and screenshot.
Attachments [Move over files to preview content of those files] (48.24 KB)
xxx xxxxxxxxxx(xxxx):
:xxxxx: xxxx – xx x xxxx xx xxxxxxx
:xxxxxxx: x xxxx xx xxx xxxxxx xx xxxx xxxxxx xx xxx xxxx
return [num * num for num in nums]

def sumList(nums):
:input: nums – is a list of numbers
:returns: the sum of the numbers in the list
xxx = 0
xxx xxx xx xxxx:
xxx += xxx
xxxxxx xxx
xx __xxxx__ == ‘__xxxx__’:
Purchasing Instruction
List Price: $19
Buy Now
Added to cart
Add to Cart
Added to cart
You May Also Like:
Python Assignments Credit Plan and Series Numbers
Python Assignments Triangle and Guessing Number
Caesar Cipher implementation in Python


There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.