def passedCredits(classes):
    """Calculates the number of credits a student passed.

    :param dict classes:
        The class information. Format:
            classes = {className: {"grade": grade, "credits",
            numCredits}}
    :return:
        The number of credits the student passed.
    :rtype: int
    """
    numCredits = 0
    classList = list(classes.keys())

    for c in classList:
        if classes[c]["grade"] != "F":
            numCredits += classes[c]["credits"]

    return numCredits