0% found this document useful (0 votes)
9 views4 pages

2D Array Sample Question 1 - EDEXCEL

The document describes a system for managing student data, including names and marks for various subjects, using one-dimensional and two-dimensional arrays. It outlines the process for inputting student information, calculating total and average marks, and assigning grades based on performance. Additionally, it includes the functionality to count and output the number of distinctions, merits, passes, and fails among the students.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views4 pages

2D Array Sample Question 1 - EDEXCEL

The document describes a system for managing student data, including names and marks for various subjects, using one-dimensional and two-dimensional arrays. It outlines the process for inputting student information, calculating total and average marks, and assigning grades based on performance. Additionally, it includes the functionality to count and output the number of distinctions, merits, passes, and fails among the students.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

The one-dimensional (1D) array studentName[ ] contains the names of students

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

# Initialize counters for grades

# Input class size and number of subjects

# Input student name

# Input marks for each subject

# Append marks to studentMark

# Store the combined total marks

# Calculate the average mark, rounded to the nearest whole number

# Determine grade and update grade counters

# Output student's name, combined total mark, average mark, and grade

#print("Grade:")

# Output the number of distinctions, merits, passes, and fails

You might also like