Question: 1 . Create a function named main and in this function you need to: ( 1 ) create a one - dimensional list of integers

1. Create a function named main and in this function you need to:
(1) create a one-dimensional list of integers including 5 elements; (5% point)
(2) assign an random integer from 0 to 100 to every element; (25% point)
(3) calls the printAverage function (the definition of this printAverage function is shown in step 2).(10% point)
2. A function named printAverage, which is able to
(1) receive a one-dimensional list as the input; (10% point)
(2) calculate the average of all elements in this list; (25% point)
(3) display the average on the Console. (5% point)
3. Add comments to your program. (15% point)
write the above mentioned program in python programming language

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 Programming Questions!