Writing a homework using functions to get a list of integers

Assignment Help Basic Computer Science
Reference no: EM13698398

Use Python 3

You will be writing a homework using functions to get a list of integers from a user and then find statistics of the given list of integers. You are not allowed to use any built in functions for finding the calculations in this assignment.

The functions required for this assignment will be:

printMenu()-Prints a menu of options to the screen
getList()-Gets list of integers from user using a while loop and returns the list
getMean(userList)-Returns the average of the integers contained in the list given by the user
getMedian(userList)-Returns the median of the integers contained in the list given by the user
printGraph(userList)-Prints a horizontal histogram of the elements in the list
getMin(userList)-Finds the lowest value in the set using a for loop and then prints value to screen
getMax(userList)-Returns the highest value in the set using a for loop
Example output:

Welcome to the List Statistics Calculator
To begin, enter a list of integers or to end the list!
Enter an integer: 67
Enter an integer: 100
Enter an integer: 50
Enter an integer: 100
Enter an integer: 50
Enter an integer: 50
Enter an integer: 60
Enter an integer: q
Please choose the statistic that you would like to calculate!
1. Mean
2. Median
3. Min
4. Max
5. Graph
Please enter your choice, or 0 to exit: 1
The mean of this data set is 68.142
Please choose the statistic that you would like to calculate!
1. Mean
2. Median
3. Min
4. Max
5. Graph
Please enter your choice, or 0 to exit: 2
The median of this data set is 60
Please choose the statistic that you would like to calculate!
1. Mean
2. Median
3. Min
4. Max
5. Graph
Please enter your choice to exit:3
The max of this data set is 100
Please choose the statistic that you would like to calculate!
1. Mean
2. Median
3. Min
4. Max
5. Graph
Please enter your choice, or 0 to exit: 4
The min of this data set is 50
Please choose the statistic that you would like to calculate!
1. Mean
2. Median
3. Min
4. Max
5. Graph
Please enter your choice to exit: 5
50: X X X
60: X
67: X
100: X X
Please enter your choice to exit: 0
Goodbye!
When you've finished your homework, use the submit command to submit the file. You must be logged into your account and you must be in the same directory as the file you're trying to submit.

Reference no: EM13698398

Questions Cloud

The use of borrowed material and utilize original ideas : The paper should be in the range of 1200 - 1500 words with double spacing. It is very important to include proper APA citation (in-text citations with quotation marks and source information, plus a reference list). Please minimize the use of bo..
Considering that computing networks : TOPIC: CONSIDERING THAT COMPUTING NETWORKS ARE MORE AND MORE INTEGRATED IN ALL ASPECTS OF OUR LIVES, DISCUSS/PROPOSE A NEW/POSSIBLE IDEA ON HOW THESE NETWORKS CAN BE KEPT SAFE FROM HACKING, AND HOW TRANSMISSION OF DATA CAN BE SECURED END TO END..
Write a term paper on virtual team management : Write a term paper on Virtual Team Management & Success that covers all the sections covered in the class. It is highly encouraged to start working on your paper from week one. The paper should be at least 14 pages excluding cover page, abstra..
A physician has treated a patient who has a diagnosis : "A physician has treated a patient who has a diagnosis that is not listed on the superbill. How is this handled by the physician? The medical biller?"
Writing a homework using functions to get a list of integers : Writing a homework using functions to get a list of integers from a user and then find statistics of the given list of integers. You are not allowed to use any built in functions for finding the calculations in this assignment.
Country fluctuates between good and bad times. : The economy of a country fluctuates between good and bad times. When times are good, people go on vacations or travel for business more often, thereby causing a boom in the hospitality industry. When times are bad, people delay or forgo taking ..
Statements is not true about continuous audit : Audit of banks is an example of - a) Statutory audit b) Balance sheet audit c) Concurrent audit d) Both (a) and (b) e) All of the above 2. Concurrent audit is a part of­ a) Internal check system b) Continuous audit c) Internal audit system d) None
Include a brief history of the two traditions and a comparis : Include a brief history of the two traditions and a comparison of their approach to the Bible, art, specific symbols, and rituals as well as core beliefs. You might consider visiting in person or exploring one of these churches online to add yo..
A large school district is reevaluating its teachers salarie : A large school district is reevaluating its teachers salaries. They have decided to use regression analysis to predict mean teacher salaries at each high school. The researcher uses years of experience and subject matter (Math, science, English..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  An ability to utilise

An ability to utilise sources such as the Internet and University library facilities to search, locate and summarise data relevant to the assignment

  Which of the following runs as a dedicated server only

Which of the following runs as a dedicated server only?

  What is the accuracy of a two-bit predictor

What is the accuracy of a two-bit predictor, assuming the predictor starts off in the bottom left state? What if the pattern repeats forever?

  Write a function to draw each figure

Need working c program code for a program that has the ability to draw patterns of characters on the output terminal that will show a solid square, a hollow box or a solid isosceles triangle provided the character to draw with the # of rows.

  Discuss how current or potential employers

From the e-Activity, discuss how current or potential employers might be able to use the information you found and possible steps that could be taken to help ensure your privacy. Provide specific examples to support your response.

  Limitations of the use of ai technologies

Determine some of the limitations or dangers you see in the use of AI technologies such as expert systems, virtual reality, and intelligent agents?

  Expert systems created-deployed in real-world applications

Expert systems have been created and deployed in many real-world applications to support decision making. Discover one recent case study or academic journal article.

  Select a real or hypothetical business engaged in e-busines

Step 1: Establish a target audience and scope for your presentation. Select a real or hypothetical business engaged in e-business and outline its central offerings and/or services. Next, outline the categories of information that may require c..

  Tester as a penetration tester you are hired as a

as a penetration tester you are hired as a consultant by a small- to mid-sized business that is interested in

  Give examples of 4 vertices and 6 vertices degrees graph

If possible, give examples of: a) A graph with 4 vertices whose degrees are 1, 2, 3 and 3. b) A graph with 6 vertices whose degrees are 2, 4, 3, 3, 4 and 5. If it is not possible, explain why.

  Search the internet for owasp

Define the acronym and locate the most current top 10 Web-application security risks

  Describe history of portfolio design in graphics design

Describe the history of portfolio design in the graphics design industry, and role of a graphic designer. Discuss current trends in portfolio design, and the possible future technologies for the industry.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd