def AverageDegree(K):
    """
    AverageDegree calculates the average degree value of a network.
    Input:
        K = array of degree values
    Output:
        z = average degree value
    """
    n = len(K)
    z = sum(K)/n
    return z