def convert_distance(val, old_scale="meter", new_scale="centimeter"):
    """
    Convert from a length scale to another one among meter, centimeter, inch,
    feet, and mile.

    Parameters
    ----------
    val: float or int
        Value of the length to be converted expressed in the original scale.

    old_scale: str
        Original scale from which the length value will be converted.
        Supported scales are Meter ['Meter', 'meter', 'm'],
        Centimeter ['Centimeter', 'centimeter', 'vm'], Inch ['Inch', 'inch', 'in'], Feet ['Feet', 'feet', 'ft'] or Mile ['Mile', 'mile', 'mil'].

    new_scale: str
        New scale from which the length value will be converted.
        Supported scales are Meter ['Meter', 'meter', 'm'],
        Centimeter ['Centimeter', 'centimeter', 'cm'], Inch ['Inch', 'inch', 'in'], Feet ['Feet', 'feet', 'ft'] or Mile ['Mile', 'mile', 'mil'].

    Raises
    -------
    NotImplementedError if either of the scales are not one of the requested
    ones.

    Returns
    -------
    res: float
        Value of the converted length expressed in the new scale.
    """
    # Convert from 'old_scale' to Meter
    if old_scale.lower() in ['centimeter', 'cm']:
        temp = val / 100.0
    elif old_scale.lower() in ['meter', 'm']:
        temp = val
    elif old_scale.lower() in ['inch', 'in']:
        temp = val / 39.37008
    elif old_scale.lower() in ['feet', 'ft']:
        temp = val / 3.28084
    elif old_scale.lower() in ['mile', 'mil']:
        temp = 1609.344 * val
    else:
        raise AttributeError(
            f'{old_scale} is unsupported. m, cm, ft, in and mile are supported')
    # and from Meter to 'new_scale'
    if new_scale.lower() in ['centimeter', 'cm']:
        result = 100*temp
    elif new_scale.lower() in ['meter', 'm']:
        result = temp
    elif new_scale.lower() in ['inch', 'in']:
        result= 39.37008*temp
    elif new_scale.lower() in ['feet', 'ft']:
        result=3.28084*temp
    elif new_scale.lower() in ['mile', 'mil']:
        result=temp/1609.344
    else:
        raise AttributeError(
            f'{new_scale} is unsupported. m, cm, ft, in and mile are supported')
    return result