def error_rate(error_count, total):
    """
    Calculate the error rate, given the error count and the total number
    of words.

    Args:
        error_count (int): Number of errors.
        total (int): Total number of words (of the same type).

    Returns:
        tuple (int, int, float): The error count, the total number
            of words, and the calculated error rate.
    """

    if total == 0:
        return error_count, total, 0.0
    return error_count, total, (error_count/total)*100