def max_grade(grades):
    """
    Returns the maximum grade in the grade dictionary

    Parameter grades: The dictionary of student grades
    Precondition: grades has netids as keys, ints as values
    """
    maximum = 0

    # Loop over keys
    for k in grades:
        if grades[k] > maximum:
            maximum = grades[k]

    return maximum