Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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,

image text in transcribed

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

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

Step: 3

blur-text-image

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

Ai And The Lottery Defying Odds With Intelligent Prediction

Authors: Gary Covella Ph D

1st Edition

B0CND1ZB98, 979-8223302568

More Books

Students also viewed these Databases questions

Question

dy dx Find the derivative of the function y=(4x+3)5(2x+1)2.

Answered: 1 week ago