GRADING STUDENTS

Subscribers:
4,890
Published on ● Video Link: https://www.youtube.com/watch?v=0hTO08WfpKo



Duration: 5:30
20 views
1


Given the initial value of each of Sam's students, write code to automate the rounding process.

EXPLANATION CODE:
1) This function takes as input a list of grades and outputs a new list with the grades rounded in accordance with a predetermined rule. Grades that fall below 38 are not rounded. A grade is rounded up to the next multiple of 5 if it is at least 38 and the gap between it and the subsequent multiple of 5 is less than 3. If not, there is no rounding of the grade.

2) The function iterates through each grade in the input list using a for loop. If a grade is less than 38, it is skipped. If it is at least 38, the difference between the grade and the next multiple of 5 is computed using the modulo operator (%), and stored in a variable called "diff". If diff is less than 3, the grade is rounded up to the next multiple of 5 by adding "diff" to the grade. Finally, the new grade is stored back in the input list at the same index.

3) The function returns the updated list with the grades rounded in accordance with the rule after going over every grade in the input list.
#hackerrank #prepare #algorithms #implementation #grading #students #csharp #csharpprogramming #education #coding #programming #easy #difficulty #reading #arithmetic #learntocode #tutorial #problemsolving #algorithmic #asmr #asmrtyping

Contents:
0:00 - Reading
2:50 - Solving
4:20 - Explaining







Tags:
coding
programming
problem solving
problem
solving
algorithmic
reading
asmr
asmr typing
education
easy difficulty
easy
difficulty
tutorial
how to program
explanation
how to
hackerrank
hackerrank problem solving
implementation
grading students
grading
students
c sharp
c sharp programming