def interpolate(x0, y0, x1, y1, x):
    """Linear interpolation between two values

    Parameters
    ----------
    x0: int 
        Lower x-value
    y0: int
        Lower y-value
    x1: int
        Upper x-value
    y1: int
        Upper y-value
    x: int
        Requested x-value

    Returns
    -------
    int, float
        Interpolated y-value
    """
    y = (y0 * (x1 - x) + y1 * (x - x0)) / (x1 - x0)
    return y