Answer:
Step-by-step explanation:
The following code is written in Python. It uses the numpy import to calculate all of the necessary values as requested in the question and the random import to generate random test scores. Once the array is populated using a for loop with random integers, the array is sorted and the Mean, Variance, and Median are calculated. Finally The sorted array is printed along with all the calculations. The program has been tested and the output can be seen below.
from random import randint
import numpy as np
test_scores = []
for x in range(200):
test_scores.append(randint(55, 99))
sorted_test_scores = sorted(test_scores)
count = 0
print("Scores in Rows of 10: ", end="\\")
for score in sorted_test_scores:
if count < 10:
print(str(score), end= " ")
count += 1
else:
print('\\' + str(score), end= " ")
count = 1
mean = np.mean(sorted_test_scores)
variance = np.var(sorted_test_scores, dtype = np.float64)
median = np.median(sorted_test_scores)
print("\\")
print("Mean: " + str(mean), end="\\")
print("Variance: " + str(variance), end="\\")
print("Median: " + str(median), end="\\")