from typing import List


def average(grades: List[float]) -> float:
    """Calculates the average of an array of grades, rounded to 2 decimal places

    Args:
        grades (List[float]): An array of number grades

    Returns:
        float: The average of the grades
    """
    sumofnumbers = 0
    for t in grades:
        sumofnumbers = sumofnumbers + t

    avg = sumofnumbers / len(grades)

    return round(avg, 2)