[Solved] I’m struggling to make the function work on my code. I’m missing the part where i want to print the letter grade


You need to adjust your showScores and printLetterGrade functions as follows:

def showScores(grade1, grade2, grade3, grade4, grade5):
    print("{} is {}".format(grade1, printLetterGrade(grade1)))
    print("{} is {}".format(grade2, printLetterGrade(grade2)))
    print("{} is {}".format(grade3, printLetterGrade(grade3)))
    print("{} is {}".format(grade4, printLetterGrade(grade4)))
    print("{} is {}".format(grade5, printLetterGrade(grade5)))


def printLetterGrade(grade):
    if (grade < 60):
        printLetterGrade = "F"
    elif (grade < 70):
        printLetterGrade ="D"
    elif (grade < 80):
        printLetterGrade = "C"
    elif (grade < 90):
        printLetterGrade = "B"
    elif (grade < 101):
        printLetterGrade = "A"
    return printLetterGrade

solved I’m struggling to make the function work on my code. I’m missing the part where i want to print the letter grade