/**
 * Given a list of grades and a list of new grades,
 * update the original grades by replacing any grades
 * less than 60 with the corresponding new grade.
 *
 * @param grades List of grades
 * @param newGrades List of new grades
 * @return Updated grades list with replaced grades
 */
fun updateGrades(grades: MutableList<Int>, newGrades: List<Int>): MutableList<Int> {

    val updatedGrades = grades.toMutableList() // Make a copy of the original grades

    for (i in updatedGrades.indices) {
        if (updatedGrades[i] < 60) { // Check if the grade is less than 60
            updatedGrades[i] = newGrades[i] // Replace with the corresponding new grade
        }
    }

    return updatedGrades
}
/**
 * Given a list of grades and a list of new grades,
 * update the original grades by replacing any grades
 * less than 60 with the corresponding new grade.
 *
 * @param grades List of grades
 * @param newGrades List of new grades
 * @return Updated grades list with replaced grades
 */
fun updateGrades(grades: MutableList<Int>, newGrades: List<Int>): MutableList<Int> {
/**
 * Given a list of grades and a list of new grades,
 * update the original grades by replacing any grades
 * less than 60 with the corresponding new grade.
 *
 * @param grades List of grades
 * @param newGrades List of new grades
 * @return Updated grades list with replaced grades
 */
fun updateGrades(grades: MutableList<Int>, newGrades: List<Int>): MutableList<Int> {

    val updatedGrades = grades.toMutableList() // Make a copy of the original grades

    for (i in updatedGrades.indices) {
        if (updatedGrades[i] < 60) { // Check if the grade is less than 60
            updatedGrades[i] = newGrades[i] // Replace with the corresponding new grade
        }
    }

    return updatedGrades
}