2D Array Sample Question 1 - EDEXCEL
2D Array Sample Question 1 - EDEXCEL
in a class. The two-dimensional (2D) array studentMark[ ] contains the mark for
each subject, for each student.
The position of each student’s data in the two arrays is the same,
The variable classSize contains the number of students in the class. The variable
subjectNo contains the number of subjects studied.
studentName[ ]
l
0 1 2 3 4 5 6
studentMark[ ]
0
1
2
3
totalMarks[ ]
l
0 1 2 3 4 5 6
stuAvg = []
l
0 1 2 3 4 5 6
All students study the same number of subjects.
Students are awarded a grade based on their average mark.
# Initialize necessary lists and variables
# Output student's name, combined total mark, average mark, and grade
#print("Grade:")