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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started