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
-
What are the four properties that must be present in order to use the binomial distribution?
-
McDonalds Corporation, the worlds largest fast-food restaurant chain, with 2010 revenues of $28 billion, has recently been on a roll. Its shareholder value rose over 50% from May 2010 to May 2013....
-
Class Year in Statistics The StudentSurvey data file contains information from a survey done the first day of an introductory statistics course. The Year variable shows the class year (FirstYear,...
-
Define cost as applied to the valuation of inventories.
-
Mahalo Boat Adventure Inc. has a July 31 year-end. It showed the following partial amortization schedules regarding two bond issues: Bond Issue A (A) Cash Interest Paid (B) Period Interest (E)...
-
On December 31, Y3, Aylmer Industries Inc. purchased 85% of the outstanding shares of Belmont Inc. The purchase price is indicated on the excel file. The entry has been recorded on the books of...
-
A donut shop sells sixteen different kinds of donuts: regular glazed, chocolate frosted, vanilla frosted, sprinkle covered, bavarian kreme filled, boston kreme filled, chocolate kreme filled, french...
-
In a Prince Market Research survey of 2518 motorists, 252 said that they made an obscene gesture in the previous month. a. If 1 of the surveyed motorists is randomly selected, what is the probability...
-
Complete the approximation argument for Lvy's arc-sine law from \(\S 8.9\) : a) Show, by a direct calculation, that \(v_{n, \lambda}(x)\) converges as \(n ightarrow \infty\). Conclude from (8.16)...
-
The quadratic covariation of two continuous \(L^{2}\) martingales \(M, N \in \mathcal{M}_{T}^{2, c}\) is defined as in the discrete case by the polarization formula (15.8). Let \(\left(B_{t} ight)_{t...
-
For each pair of functions: i Sketch the graphs of y = f(x) and y = g(x) on the same axes. ii Find the coordinates of any points of intersection. iii Write down the solutions to the inequality f(x) ...
-
Modern Designs is seeking a supplier of copper wire for artistic and cosmetic effects on high-end decorative consumer products. Considerable research into suppliers has been conducted, and all except...
-
Create the Control Panel interface that has the following 3 methods: public int warningLevel (); public String status (); public boolean isok (); Write 2 public static methods 1) Write a public...
-
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 best case study of all is probably the real-world situation. This allows you to: choose situations that are topical; choose countries that you are both knowledgeable about and interested in; ...
-
The per share element of the EPS calculation includes: A. All shares. B. The average number of ordinary shares outstanding during the year. C. The number of ordinary shares outstanding at the end of...
-
The dividend yield is the: A. Dividends paid per ordinary share. B. The proportion of the return in one year on a share. C. The profit per share. D. The dividend on a share as a proportion of the...
Study smarter with the SolutionInn App