Year 9 · Python · Challenge 1

Student Scores

A class mark book as a 2D array — count high scores, total one student, average a subject column, and find max/min.

2D arraycounttotalaveragemax / min

Scenario: Data for a small class is stored in a 2D array. Each row is a student and each column is a subject: Math, Science and English.

Data

student_scores = [
    # Math, Science, English
    [85, 90, 88],  # Student 1
    [76, 88, 92],  # Student 2
    [94, 78, 81],  # Student 3
    [89, 95, 91]   # Student 4
]

Your tasks

  1. Counting — count how many scores in the entire class are 90 or above.
  2. Totalling — calculate and print the total score for Student 3 (row index 2).
  3. Averaging — calculate the average score for the Science test (column index 1).
  4. Maximum and minimum — find the highest score in English (column 2) and the lowest score in Math (column 0).
💡 Try every task in your editor first. Only reveal the solution when you have had a proper go.

Year 9 Python · Next: Challenge 2