Find the Top Scoring Student

0
easy

In a recent classroom quiz, students were evaluated based on their answers to a series of questions. Given a 2D list StudentAnswers, where each row corresponds to an individual student's set of answers to these questions, and a 1D list QuestionPoints indicating the points awarded for each respective question, compute the aggregate score for every student. The score for a student is determined by multiplying their answers (either 0 or 1, with 1 meaning the answer is correct) with the points for each question and summing up the products. Return the index of the student who achieved the topmost score, presented within a tensor.

Examples:

1
0
1
0
1
1
1
1
0
2
3
1
2
1
0
0
1
1
1
2
3
2

Loading...
2024 © TensorGym
Contrinbute | Contact | Copyright | 𝕏