def defuzzify(fired_rule_tuples: list) -> float:
    """
    defuzzify consequent fuzzy values based on weighted average
    :param fired_rule_tuples: list of tuples containing consequent values and matching rule weights
    :return: The weighted average
    """
    print(list(map(lambda x: x[0], fired_rule_tuples)))
    return sum([w*z for w,z in fired_rule_tuples]) / sum(map(lambda x: x[0], fired_rule_tuples))