Write another program that prompts for a list of numbers as above and at the end...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write another program that prompts for a list of numbers as above and at the end prints out the minimum., maximum and median of the numbers instead of the average. YOU ARE NOT ALLOWED TO USE THE MINIMUM, MAXIMUM or MEDIAN FUNCTIONS OF PYTHON FOR THIS ASSIGNMENT. You may use the Python sorted() function when calculating the median An example of output is the following: Enter a number: 40 Enter a number: 50 Enter a number: twenty five Invalid input Enter a number: 70.8 Enter a number: done The minimum number is: 40 The maximum number is: 70.8 The median is 50 SOME HELPFUL INFORMATION: To create a new empty list call my list, simply write: my list | To add a new element (for example 3.14) to the list use the append as shown below: my list.append(3.14) %3D Write another program that prompts for a list of numbers as above and at the end prints out the minimum., maximum and median of the numbers instead of the average. YOU ARE NOT ALLOWED TO USE THE MINIMUM, MAXIMUM or MEDIAN FUNCTIONS OF PYTHON FOR THIS ASSIGNMENT. You may use the Python sorted() function when calculating the median An example of output is the following: Enter a number: 40 Enter a number: 50 Enter a number: twenty five Invalid input Enter a number: 70.8 Enter a number: done The minimum number is: 40 The maximum number is: 70.8 The median is 50 SOME HELPFUL INFORMATION: To create a new empty list call my list, simply write: my list | To add a new element (for example 3.14) to the list use the append as shown below: my list.append(3.14) %3D
Expert Answer:
Answer rating: 100% (QA)
Below is the python3 code for mentioned problem statement def minmax1 x this function fails if the list length is 0 minimum maximum x0 for i in x1 if ... View the full answer
Related Book For
Posted Date:
Students also viewed these accounting questions
-
At Zooeys elementary school, children are not allowed to trade lunches or components of their lunches with other students. Lunchroom monitors watch closely and strictly enforce this policy. Help...
-
The Python function mergesort recursively sorts a list of numbers U using a recursive divide-and-conquer algorithm, then returns a sorted list S. The function head returns the first element of a...
-
Write a Scheme function that takes a simple list of numbers as its parameter and returns the largest and smallest numbers in the list.
-
Recession is defined as... a) increase in unemployment b) decrease in consumer spending c) two consecutive quarters of negative economic growth d) both A & B
-
Refer to the section on The Virtual Office. What do you think will be the long-term impact of the mobile office on job satisfaction and performance? If you were a manager, how would you maximize the...
-
1. Which theoretical explanation, or explanations, of FDI best explains Cemexs FDI? 2. What is the value that Cemex brings to a host economy? Can you see any potential drawbacks of inward investment...
-
Most balance sheets are defined as classified balance sheets in that both the assets and liabilities are dichotomized into the categories of current and noncurrent. [In those industries in which the...
-
On July 1, 2011, the Morgan County School District received a $30,000 gift from a local civic organization with the stipulation that, on June 30 of each year, $2,000 plus any interest earnings on the...
-
4. Figure shows an unbalanced fourbar linkage. 30 R-33, Link 2 a=2 M my-10g my-82 g ma-48 g R =? Link 3 m ms B-179 60 27 23 50 Link 4 Balance this linkage using two balancing weights of m = m =...
-
corporation is resisting the personal holding company tax, but the Tax Court sides with the IRS. Within 90 days after the adverse decision, one shareholder transfers his stock and $10,000 in cash to...
-
Evaluate as specified. For f(x) = 5(2)*, find f(3). %3D 40 O30 8. O 1000 Question 2 0.1 pts Evaluate as specified. For f(x) =| X, find f(-3). 27 -9 27 27
-
What pre-existing stability models can we take in as inspirations and present our model as an extension or a new dimension to them, or is our model a totally new concept?
-
This case presents a constitutional question never addressed by this Court: whether a statutory scheme adopted by the State of Virginia to prevent marriages between persons solely on the basis of...
-
Many fathers' rights organizations have argued that unless a court can order joint custody even where one parent is opposed, men will never be treated fairly. What do you think of this position?
-
The following facts were established at trial. V.C. and M.J.B., who are lesbians, met in 1992 and began dating on July 4, 1993. On July 9, 1993, M.J.B. went to see a fertility specialist to begin...
-
Ed Danti appeals the divorce decree entered between himself and his exwife, Michelle Danti, particularly challenging the provisions awarding Michelle sole physical custody of their two children and...
-
1. When the government chooses to use resources to build a new bridge to Surrey, those resources are no longer available to build a Skytrain to UBC. This illustrates the concept of: A. A closed...
-
C- Consider the following scenario:- A supermarket needs to develop the following software to encourage regular customers. For this, the customer needs to supply his/her residence address, telephone...
-
What is the value of mystery after this sequence of statements? int mystery = 1; mystery = 1 - 2 * mystery; mystery = mystery + 1;
-
Write an application with a Color menu and menu items labeled Red, Green, and Blue that change the background color of a panel in the center of the frame to red, green, or blue.
-
The recursive computation of Fibonacci numbers can be speeded up significantly by keeping track of the values that have already been computed. Provide an implementation of the fib method that uses...
-
The monopolist, like the perfect competitor, will maximize profits at that output where _________ = MC.
-
A barrier to entry is control over an important _________, such as Alcoas control over bauxite in the 1940s and De Beerss control over much of the worlds output of diamonds.
-
If at a monopolists profit-maximizing price and output, the price is less than _________, the monopolist is generating economic losses.
Study smarter with the SolutionInn App