Question: In this question, you will be assessed with functions : Write a Python function to sum all the numbers in a list. (44, 33, 22,
- In this question, you will be assessed with functions:
- Write a Python function to sum all the numbers in a list. (44, 33, 22, 11)
- Write a Python function that takes the result of 3a and returns its square.
- Print the result in the main call. Refer to stub assignment1_partB_function.py
use below code to execute the program,
def sum(L):
def squareList(R):
def main():#this executes 2nd
# list=[] populate your list with 44, 33, 22, 11 # call sum function to add the items in list and return result # call squareList function on the previous result and return new result print("The list items are: " ...) print("The result of their summation is:" ...) print("The square of summation is:" ...)
main()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
