Use functions to get a list of integers from a user

Assignment Help Basic Computer Science
Reference no: EM13700357

Use 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

Reference no: EM13700357

Questions Cloud

The oracle corporation is an multinational computer : Discuss at lease 500 words. The Oracle Corporation is an multinational computer technology corporation that specializes in developing and marketing hardware systems and enterprise software products.
What is the change in the width of the central maximum : In a large vacuum chamber, monochromatic laser light passes through a narrow slit in a thin aluminum plate and forms a diffraction pattern on a screen that is 0.620m from the slit. What is the change in the width of the central maximum
Find the initial speed of the second stone : A rock climber stands on top of a 60 m high cliff hanger a pool of water. He throws two stones vertically downward 1.0 s apart and observes that they cause a single splash. What was the initial speed of the second stone
Experience with pcap : The purpose of this assignment is to identify your experience with full packet capture.Research packet capture, and report on its usefulness in cyber security and network forensics.
Use functions to get a list of integers from a user : Use 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.
What is the final pressure of the gas : Expand 1.025 mole of an ideal monatomic gas initially at 5.47 kPa and 642 K from initial volume Vi = 1.00 m3 to final volume Vf = 2.00 m3. What is the final pressure of the gas
Estimate the voltage across the resistor : A current of 2.00 A flows through a resistor that has R = 4.84 ohm. What is the voltage across the resistor
Spanning forest is a subset of a graph : a) Assume Ce in Z. Give an algorithm that finds the MSF (minimum spanning forest), show correctness and running time of this algorithm.
Find the entropy change of the aluminum : In an experiment, 230 g of aluminum (with a specific heat of 900 J/kg • K) at 100°C is mixed with 48.0 g of water (4186 J/kg•K) at 20°C, What is the entropy change of the aluminum

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Solve reasoning problem

If Abby is communicating, so is Randy. Vijay and Kevin are either both communicating or neither is. If Heather is communicating, then so are Abby and Kevin. Describe your reasoning.

  Explain throughput and capacity for effectiveness of system

Do you agree or disagree that throughput and capacity are finding factors for effectiveness of system more so than processor speed?

  An msp430-based system interfaces 4 external devices

An MSP430-based system interfaces 4 external devices (ED0, ED1, ED2, ED3), each capable of generating an interrupt request.

  Contact a local company who uses information systems

Contact a local company who uses information systems

  Design program asks user enter the number packages purchased

Design a program that asks the user to enter the number of packages purchased.

  Conduct observation used in business or organization

Conduct the observation to someone involved in procedure which is used in the business or organization. This person could be someone at university.

  Explaining reliable information systems staff member

How many information systems staff member do you think Reliable can reasonably afford to employ? what mix of skills would they need?

  Write a program that prompts the user for a measurement

write a program that prompts the user for a measurement in meters and then converts it to miles, feet and inches.

  Give remediation recommendation for potential vulnerability

Provide a remediation recommendation for a potential vulnerability found with the use of the "eval" function in a static analysis report.

  What is a relational query optimizer

How do relational query optimizers work? What information does a relational query optimizer use in making its decisions?

  Write a java program that reads a phrase from the input

Write a Java program that reads a phrase from the input and outputs the WORDS in reverse order.

  Analysis of competitive organization and possible threats

Analysis of competitive organization and possible threats and how organization is using E-Business Management facilities for daily activities? Limitations if any, adding more features for E-Business if required.

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