Calculadora de Porcentajes de NotasCalculadora de Porcentajes de Notas
—- :Resultado: —-
Asignatura/Examen | Grado | Peso (%) |
---|
Promedio ponderado de porcentaje:
Promedio ponderado de calificación:
');
resultWindow.document.close();
}function resetForm() {
const assignmentRows = document.getElementById('assignmentRows');
const rows = document.querySelectorAll('#assignmentRows tr');
rows.forEach(row => row.remove());
addAssignmentRow();
addAssignmentRow();
document.getElementById('gradePercentageResult').innerHTML = '';
document.getElementById('warningMessage').innerHTML = '';
document.getElementById('resultContainer').style.display = 'none';
document.getElementById('printResultButton').style.display = 'none';
document.getElementById('resultBoxContainer').style.display = 'none';
}document.getElementById('reset-button').addEventListener('click', function () {
resetForm();
});function generateLetterGradeOptions() {
const letterGrades = ['A+', 'A', 'A-', 'B+', 'B', 'B-', 'C+', 'C', 'C-', 'D+', 'D', 'D-', 'F'];
const rows = document.querySelectorAll('#assignmentRows tr');rows.forEach(function (row) {
const selectElement = row.querySelector('.letter-grade');
if (selectElement) {selectElement.innerHTML = '';letterGrades.forEach(function (grade) {
const option = document.createElement('option');
option.value = grade;
option.textContent = grade;
selectElement.appendChild(option);
});
}
});
}function calculateLetterGrade(percentage) {
if (percentage >= 97 && percentage <= 100) {
return 'A+';
} else if (percentage >= 93 && percentage <= 96) {
return 'A';
} else if (percentage >= 90 && percentage <= 92) {
return 'A-';
} else if (percentage >= 87 && percentage <= 89) {
return 'B+';
} else if (percentage >= 83 && percentage <= 86) {
return 'B';
} else if (percentage >= 80 && percentage <= 82) {
return 'B-';
} else if (percentage >= 77 && percentage <= 79) {
return 'C+';
} else if (percentage >= 73 && percentage <= 76) {
return 'C';
} else if (percentage >= 70 && percentage <= 72) {
return 'C-';
} else if (percentage >= 67 && percentage <= 69) {
return 'D+';
} else if (percentage >= 63 && percentage <= 66) {
return 'D';
} else if (percentage >= 60 && percentage <= 62) {
return 'D-';
} else {
return 'F';
}
}function displayPopupMessage(message) {
var popupMessage = document.getElementById('popupMessage');
var popupMessageText = document.getElementById('popupMessageText');
var popupCloseButton = document.getElementById('popupCloseButton');popupMessageText.textContent = message;
popupMessage.style.display = 'block';popupCloseButton.addEventListener('click', function () {
popupMessage.style.display = 'none';
});
}