Intro to Python Classwork: Number Stats, Part 2
Copy your "NumberStatsPart1.py" program into a new file named
"NumberStatsPart2.py".  Then, in addition to displaying the sum and
mean of the numbers, you will also need to display both the range
and the median of the list of integers.  This means that you will
need to store the numbers in a list, and then numerically sort the
numbers after the user has finished entering them.  When adding the
user's numbers to your list, make sure you store the values as
integers (not strings).

The range of a list of numbers is the difference between the
largest number and smallest number in the list.  The median is the
middle number when the list is arranged in numerical order.  If
the list contains an even number of integers, then the median is
the average of the two middle numbers when the list is in order.

As was the case with part #1, your program does not need to
perform any error trapping.  That is, you may once again assume
that the user will enter only integers.

Your program's output should be formatted in a manner similar to
what is shown below.  You may put all of your code into the main
area of the program.  Your program should not import or use any
external functions.  This includes Python functions designed to
find the range and/or median of a set of numbers.


As always, all of your code must be your own, written entirely and
only by you within your online CodeHS.com account.  You must never
copy/paste, receive, view, or in any way use code that was created
or modified by another person, entity, or artificial intelligence.


Example Program Run #1
Please enter an integer:

You did not enter any numbers.  Goodbye!


Example Program Run #2
Please enter an integer:  3
Please enter an integer:  4
Please enter an integer:  5
Please enter an integer:  6
Please enter an integer:  5
Please enter an integer:  6
Please enter an integer:  7
Please enter an integer:

The sum of your numbers is:  36
The average of your numbers is:  5.14
The range of your numbers is:  4
The median of your numbers is:  5


Example Program Run #3
Please enter an integer:  17
Please enter an integer:  -3
Please enter an integer:

The sum of your numbers is:  14
The average of your numbers is:  7
The range of your numbers is:  20
The median of your numbers is:  7


Example Program Run #4
Please enter an integer:  5
Please enter an integer:  0
Please enter an integer:  13
Please enter an integer:  4
Please enter an integer:

The sum of your numbers is:  22
The average of your numbers is:  5.5
The range of your numbers is:  13
The median of your numbers is:  4.5


Example Program Run #5
Please enter an integer:  12
Please enter an integer:  3
Please enter an integer:  11
Please enter an integer:  3
Please enter an integer:  18
Please enter an integer:

The sum of your numbers is:  47
The average of your numbers is:  9.4
The range of your numbers is:  15
The median of your numbers is:  11


Advanced Option #1
In addition to displaying the sum, average, range, and median,
also display the mode (or modes) of the entered integers.  This
option should not import or use any external Python functions.

Advanced Option #2
In addition to displaying the sum, average, range, and median,
also show a table with the frequency of each integer entered.
That is, show each unique integer, along with the number of
times that the integer was entered by the user.  This option,
which may be completed along with, or instead of, the above
advanced option, should not import or use any external Python
functions.

Advanced Option #3
In addition to displaying the sum, average, range, and median,
also show the total number of unique perfect squares entered
by the user.  A perfect square is an integer whose square root
is also an integer.  If a specific perfect square was entered
by the user multiple times, count that number only one time
when determining the total number of perfect squares entered
by the user.  This option, which may be completed along with,
or instead of, the above advanced options, should not import
or use any external Python functions.

Advanced Option #4
In addition to displaying the sum, average, range, and median,
also create and display a new list containing all of the prime
numbers entered by the user.  A prime number is an integer
greater than 1 which is divisible only by the number 1 and
itself.  Do not repeat any numbers in the prime number list.
That is, if the user has entered the same prime number more
than once, display that number only one time in the prime
number list.  This option, which may be completed along with,
or instead of, the above advanced options, should not import
or use any external Python functions.