Answer:
The program in Python is as follows:
import collections
from collections import Counter
from itertools import groupby
import statistics
str_input = input("Enter a series of numbers separated by space: ")
num_input = str_input.split(" ")
numList = []
for num in num_input:
if(num.lstrip('-').isdigit()):
if num[0] == "-" or int(num)>10:
print(num," is out of bound - rejecting")
else:
print(num," is valid - accepting")
numList.append(int(num))
else:
print(num," is not a number")
print("Largest number: ",max(numList))
print("Smallest number: ",min(numList))
print("Range: ",(max(numList) - min(numList)))
print("Mode: ",end = " ")
freqs = groupby(Counter(numList).most_common(), lambda x:x[1])
print([val for val,count in next(freqs)[1]])
count_freq = {}
count_freq = collections.Counter(numList)
for item in count_freq:
print(item, end = " ")
lent= int(count_freq[item])
for i in range(lent):
print("#",end=" ")
print()
Explanation:
See attachment for program source file where comments are used as explanation. (Lines that begin with # are comments)
The frequency polygon is printed using #'s to represent the frequency of each list element