When I started studying IT at the Technical University, I was introduced to HTML and CSS for the first time. I became interested in web development and soon learned about Rs School free courses. After the preparatory course, I am going to take a basic JavaScript course.I am also going to master the back-end.
Student’s Final Grade KATA from CODEWARS: Create a function finalGrade, which calculates the final grade of a student depending on two parameters: a grade for the exam and a number of completed projects.
This function should take two arguments: exam - grade for exam (from 0 to 100); projects - number of completed projects (from 0 and above);
This function should return a number (final grade). There are four types of final grades:
100, if a grade for the exam is more than 90 or if a number of completed projects more than 10.
90, if a grade for the exam is more than 75 and if a number of completed projects is minimum 5.
75, if a grade for the exam is more than 50 and if a number of completed projects is minimum 2.
0, in other cases.
function finalGrade (exam, projects) {
if (exam > 90 || projects > 10) return 100;
else if (exam > 75 && projects >= 5) return 90;
else if (exam > 50 && projects >= 2) return 75;
else return 0;
}