def formation_temperature(surface_temperature, gradient, depth):
    """
    Calculates formation temperature based on a gradient.

    Parameters
    ----------
    surface_temperature : float
        Surface temperature (deg F or deg C)
    gradient : float
        Temperature gradient (degF/ft or degC/m)
    depth : float
        Depth at which temperature is required (ft or m)

    Returns
    -------
    float
        Returns formation temperature at a entered depth
    """
    form_temp = surface_temperature + gradient * depth
    return form_temp