Question: Python Coding, Please Help! Question 1: For loops (25 points) (a) The average (or the arithmetic mean) of a set of numbers is defined as
Python Coding, Please Help!
Question 1: For loops (25 points) (a) The average (or the arithmetic mean) of a set of numbers is defined as the sum of the numbers, divided by the total number of numbers. Write a for loop that sums up 10 random numbers between [0,10], and print their average with 4 figures after the decimal point (in other words 5 significant figures). (b) Repeat part (a) for 102,103, and 106 random numbers between [0,10]. Comment on your result. (Hint: You may want to use numpy.random.randint().)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
