import math


def norm(x):
    """
    Returns the L^2 norm of a vector x

    Parameters
    ----------
    x       : np.ndarray : a numpy array of floats

    Returns
    -------
    float   : the L^2 norm of x

    Examples
    --------
    >>> A = np.array([1.0, 2.0, 3.0, 3.0, 1.0, 1.0])
    >>> norm(A)
    5.0
    """
    sum = 0
    for component in x:
        sum = sum + component**2
    return math.sqrt(sum)