JS Lab 3 progress
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import {students} from "./data.js"
|
||||
let passingStudents = [];
|
||||
|
||||
function getPassingStudents(students, passMark = 70) {
|
||||
export function getPassingStudents(students, passMark = 70) {
|
||||
if (isNaN(passMark) || passMark < 0) {
|
||||
return false;
|
||||
}
|
||||
@@ -9,13 +9,13 @@ function getPassingStudents(students, passMark = 70) {
|
||||
let grade = parseInt(student.grade);
|
||||
if (isNaN(grade)) return false;
|
||||
|
||||
return true;
|
||||
return grade >= passMark;
|
||||
});
|
||||
return passingStudents;
|
||||
}
|
||||
|
||||
function calculateCourseAverage(students) {
|
||||
|
||||
function calculateCourseAverages(students) {
|
||||
|
||||
}
|
||||
|
||||
function getTopPerCourse(students) {
|
||||
@@ -23,9 +23,11 @@ function getTopPerCourse(students) {
|
||||
}
|
||||
|
||||
function calculateOverallStatistics(students) {
|
||||
|
||||
}
|
||||
|
||||
function calculateAssignmentAvgerage(students) {
|
||||
|
||||
const summary = document.getElementById("summary");
|
||||
summary.innerHTML += `<p>Total Students: ${students.length}</p><br>
|
||||
<p>Average Grade: </p><br>
|
||||
<p>Highest Grade: </p><br>
|
||||
<p>Lowest Grade: </p><br>
|
||||
<p>Average Attendance: %</p><br>
|
||||
<p>Unique Courses: </p><br>`;
|
||||
}
|
||||
Reference in New Issue
Block a user