CMSC 201 |
Homework 6 - Due 3/31This homework must be submitted by 8pm on the due date to get any credit. 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:
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. At the Linux prompt, type submit cs201 HW6 hw6.pyAfter entering the submit command shown above, you should get a confirmation that submit worked correctly: Submitting hw6.py...OKIf not, check your spelling and that you have included each of the required parts and try again. You can check your submission by entering: submitls cs201 HW6You should see the name of the file that you just submitted, in this case hw6.py |
Adapted from UMBC CSHC's webpage design |