Question: Python 2.7 Program: Random List Statistics Your task in this programming assignment is to write a Python program that generates a list of random integers,

 Python 2.7 Program: Random List Statistics Your task in this programming

Python 2.7

Program: Random List Statistics Your task in this programming assignment is to write a Python program that generates a list of random integers, such that both its length and the minimum and maximum values added to the list are provided by the user. Subsequently, display the list, followed by statistics about the list. Here's output of a sample run (user input is shown in bold red): How many random integers would you like to add to the list? 10 What would you like the minimum value to be? -50 What would you like the maximum value to be? 50 The list: (-46, 43, 34, 48, 7, 31, 36, -11, 39, -9] The mean of the list is 17.2. The median of the list is 32.5. The range of the list is 94. Here's output of a second sample run (again, user input is shown in bold red): How many random integers would you like to add to the list? 7 What would you like the minimum value to be? 5 What would you like the maximum value to be? 999 The list: [866, 666, 447, 661, 688, 492, 81] The mean of the list is 557.285714286. The median of the list is 661. The range of the list is 785. To help clarify, here are some specifics and/or constraints: (1) The random integers must be stored in a single Python list; (2) Generating the random list (including its length, and minimum and maximum values) must be done in a function that is called from the main part of the program (see the template for more details); (3) You must use the list functions discussed in class to add integers to the list: (4) Calculating the mean, median, and range of the list must be done in separate functions, one for each statistic; (5) You must manually calculate the mean, median, and range of the list (i.e., without using math or statistical functions provided in Python libraries); however, you may use list functions to help you; (6) You must use a for loop as the repetition construct when iteration over the list is necessary (7) You must use the provided source code template, and (8) You must submit your source code as a single.py file

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!