# Write a program that creates an an array large enough to hold 200 test scores between 55 and 99. Use a Random Number to populate the array.

Write a program that creates an an array large enough to hold 200 test scores between 55 and 99. Use a Random Number to populate the array. Then do the following:1) Sort scores in ascending order.2) List your scores in rows of ten(10) values.3) Calculate the Mean for the distribution.4) Calculate the Variance for the distribution.5) Calculate the Median for the distribution.

## This Post Has 3 Comments

1. Expert says:

2. Expert says:

Solution: the categorization of functional and non-functional requirement are as follows: some of the more typical functional requirements include: • business rules• transaction corrections, adjustments and cancellations• administrative functions• authentication• authorization levels• audit tracking• external interfaces• certification requirements• reporting requirements• historical data• legal or regulatory requirementswhile,some typical non-functional requirements are: • performance – for example response time, throughput, utilization, static volumetric• scalability• capacity• availability• reliability• recoverability• maintainability• serviceability• security• regulatory• manageability• environmental• data integrity• usability• interoperability

3. anahi8621 says:

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="\n")

for score in sorted_test_scores:

if count < 10:

print(str(score), end= " ")

count += 1

else:

print('\n' + 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("\n")

print("Mean: " + str(mean), end="\n")

print("Variance: " + str(variance), end="\n")

print("Median: " + str(median), end="\n")

$Write a program that creates an an array large enough to hold 200 test scores between 55 and 99. Use$