Here's a simple doctor's code.
int student[number of students][number of subjects] = {...}, {...}, {...}, {...};
int sum = 0;
char studentName[5] = { 'A', 'B', 'C', 'D', 'E' };
for(i: repeat as many students) {
for(j: repeat as many subjects) {
sum += student[i][j];
if (if you added the last subject of the student)
{
print(studentName[i] + "Average of students: " + sum / Number of subjects + '\n')";
}
}
sum = 0;
}
Please refer to the pseudo code above and fill it out according to Python grammar.
Note that if the average value output format is a mistake, you can convert the format accordingly and output it.
The student's name is alphabetic uppercase, but unlike the pseudo code above, it is not assigned to the array.
You can simply print it out by referring to the ASCII code table.
562 Who developed the "avformat-59.dll" that comes with FFmpeg?
858 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
589 GDB gets version error when attempting to debug with the Presense SDK (IDE)
563 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.