Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN Python Please Instructlons Write a program named that repeatedly asks the user to enter numbers and puts them into a Python list. Use 999

IN Python Please

image text in transcribed

image text in transcribed

Instructlons Write a program named that repeatedly asks the user to enter numbers and puts them into a Python list. Use 999 as the sentinel value for the end of input. Then calculate and print, properly labeled: - The list - The minimum value in the list using a function named - The maximum value in the list using a function named - The average value in the list using a function named - The median value in the list using a function named Each of these functions takes a list as its parameter and returns a single float number as its result. Your program must work for any list, including an empty list. For empty lists, return zero for the result from all the calculation functions. IMPORTANT: Python has a module with functions for finding the mean and median; Python has built-in functions for the maximum and minimum of a list. However, we want you to get a lot of experience using lists in this assignment. There is also a built-in function that adds up all the items in a list. This means that you may not use the module or the built-in functions. Instead, you must write your own versions of these methods, each as its own individual function. Here is what your output might look like. Your output does not have to look exactly like this, but it must reflect the same information: Enter a value, or 999 when flinished: 54 Enter a value, or 999 when finished: 48 Enter a value, or 999 when finished: 19.66 Enter a value, or 999 when finished: 47 Enter a value, or 999 when finished: 11 Enter a value, or 999 when finished: 999 Here is your list: [54.,40.,10.66,47.,11.] The mininun value is 10.66 The maxinun value is 54.8 The average value is 32.532 The median value is 48. Finding the Median To find the median of a group of n numbers, sort them into order. (Hint: use Python's method). If n is odd, the median is the middle entry. In a list named this will be element Note the use of to do integer division. If n is even, the median is the average of the numbers "surrounding" the middle. For a list named , this When you finish, upload your program

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

Students also viewed these Databases questions

Question

Please help me evaluate this integral. 8 2 2 v - v

Answered: 1 week ago

Question

b. Where did they come from?

Answered: 1 week ago

Question

c. What were the reasons for their move? Did they come voluntarily?

Answered: 1 week ago

Question

5. How do economic situations affect intergroup relations?

Answered: 1 week ago