def amplitude(data):
    """ 
    Calculates the amplitude of a data list. 
    """
   
    n = len(data)
    if (n == 0) :
        amplitude = None
    else :
        min_value = min(data)
        max_value = max(data)
        amplitude = (max_value + min_value) / 2.0
    
    return amplitude