Files
AP-Computer-Principles-Archive/Programmig test.docx
2025-10-27 11:49:53 -05:00

145 KiB

Problem 1

For this problem I am giving you two completed functions, they are computeScore() and getRange(). Their task is described right above the function header in comments.

TASK
Your task is to create three arrays using the numbers below. Then, calculate the average of the scores denoted by the color shades and display the numbers included in the average formatted as shown in the sample run.

[95, 100,80, 80, 100, 80, 60, 80, 90]

[95, 60, 80, 80, 50, 80, 60, 80, 90]

[95, 100, 75, 80, 80, 80, 60, 80, 75]

Require output

A screen shot of a computer code AI-generated content may be incorrect.

Grade 1
Correct Score Values 90 ppts
Correct output format 10 pts

Problem 2

For this problem I am giving you two completed functions, they are computeScore() and getRange(). Their task is described right above the function header in comments.

TASK 1

Complete function computeGrade, the requirements are specified in the function hearder

TASK 2

Write the code to calculate the average of the following test scores and display the data as shown in the sample run.

    [95, 100, 80, 80, 100, 80, 60, 80, 90]

    [95, 60, 80, 80, 50, 80, 60, 80, 90]

    [95, 100, 75, 80, 80, 80, 60, 80, 75]

NOTE: You MUST use the other given functions and the one you complete when completing this TASK

SAMPLE RUN

A screenshot of a computer program AI-generated content may be incorrect.

Grade 2
Correct implementation of function computeGrade 60
Correct Average Values 30 ppts
Correct output format 10 pts

Final Grade = (grade 1 + grade 2)/2