Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

More Books

Students also viewed these Databases questions

Question

Why cant we just roll our own?

Answered: 1 week ago

Question

Write short notes on Interviews.

Answered: 1 week ago

Question

Define induction and what are its objectives ?

Answered: 1 week ago

Question

9. System creates a large, diverse talent pool.

Answered: 1 week ago