Question: Define a function that takes a list (mylist) as argument, then, performs the following tasks within the function: Sum all the numbers in the

Define a function that takes a list (mylist) as argument, then, performs the following tasks within the function:\ \ Sum all the numbers in the list.\ write a code that calculates the average (do not use built in function to calculate average) of all numbers\ return a dictionary: the keys should be called as Sum and Average and assign your findings respectively.\ Run the following cell to generate a list of random numbers by entering your R number, it will generate a list called mylist. Use mylist as argument for the function call and you should use print function with appropriate message to display the outputs. # Only run this cell and input your R number\ import string\ import random\ n=int(float(input("Type your R number: ")))%1000\ \ mylist=random.choices(list(range(0,101)),k=n)\ print("\ mylist: ", mylist) Type your R#: 11852807

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!