/**
 * Given a grade, determine if it is passing or not.
 *
 * The grade should be represented as a Pair where the first element is the subject name (String) and the second element
 * is the score (Float).
 *
 * Return 'Pass' if the score is greater than or equal to 70, otherwise return 'Fail'.
 * If the grade Pair is empty, return an empty string.
 *
 * Example:
 * checkGrade(Pair("Math", 85))  =>  "Pass"
 * checkGrade(Pair("English", 60))  =>  "Fail"
 * checkGrade(null)  =>  ""
 */
fun checkGrade(grade: Pair<String, Float>?): String {

    if (grade == null) {
        return ""
    } else {
        // Extract the score from the grade Pair
        val score = grade.second
        return if (score >= 70) {
            "Pass"
        } else {
            "Fail"
        }
    }
}
/**
 * Given a grade, determine if it is passing or not.
 *
 * The grade should be represented as a Pair where the first element is the subject name (String) and the second element
 * is the score (Float).
 *
 * Return 'Pass' if the score is greater than or equal to 70, otherwise return 'Fail'.
 * If the grade Pair is empty, return an empty string.
 *
 * Example:
 * checkGrade(Pair("Math", 85))  =>  "Pass"
 * checkGrade(Pair("English", 60))  =>  "Fail"
 * checkGrade(null)  =>  ""
 */
fun checkGrade(grade: Pair<String, Float>?): String {
/**
 * Given a grade, determine if it is passing or not.
 *
 * The grade should be represented as a Pair where the first element is the subject name (String) and the second element
 * is the score (Float).
 *
 * Return 'Pass' if the score is greater than or equal to 70, otherwise return 'Fail'.
 * If the grade Pair is empty, return an empty string.
 *
 * Example:
 * checkGrade(Pair("Math", 85))  =>  "Pass"
 * checkGrade(Pair("English", 60))  =>  "Fail"
 * checkGrade(null)  =>  ""
 */
fun checkGrade(grade: Pair<String, Float>?): String {

    if (grade == null) {
        return ""
    } else {
        // Extract the score from the grade Pair
        val score = grade.second
        return if (score >= 70) {
            "Pass"
        } else {
            "Fail"
        }
    }
}