def updateGrade(classes, className, newGrade):
    """Updates grade for className to newGrade.

    :param dict classes:
        The class information. Format:
            classes = {className: {"grade": grade, "credits",
            numCredits}}
    :param str className:
        The class for which the grade is to be updated.
    :param str newGrade:
        The updated grade.
    :return:
        Returns True if className was assigned newGrade (i.e.,
        className is in classes), else False.
    :rtype: bool
    """
    if className not in classes:
        return False
    else:
        className = className.upper()
        newGrade = newGrade.upper()
        # numCredits = classes["credits"]

        classes[className]["grade"] = newGrade

        return True