import logging


def heart_rate(length_of_strip, count):
    """Determine the average heart rate from the ECG strip

    Another of the calculated data was the estimated average heart rate
    over the length of the ECG strip. To determine this, two values are
    necessary, the duration of the ECG strip and the number of peaks present.
    With these two values, the following formula was utilized to calculate
    the estimated average heart rate:
    Heart Rate = (# beats / duration of ECG strip) * (60 seconds / minute)
    With this formula, the average heart rate is found and returned by
    this function.

    Parameters
    ----------
    length_of_strip : float
        Contains duration of ECG strip in seconds
    count : int
        Value containing the number of peaks present

    Returns
    -------
    float
        Contains the average heart rate (beats per minute)
    """
    logging.info("Determining the estimated average heart rate")
    mean_hr = count/length_of_strip * 60     # 60 sec / min
    return mean_hr