from typing import Dict
from typing import Any
from typing import List


def set_user_defined_floats(fha: Dict[str, Any], floats: List[float]) -> Dict[str, Any]:
    """Set the user-defined float values for the user-defined calculations.

    :param fha: the functional hazard assessment dict.
    :param list floats: the list of float values.
    :return: fha; the functional hazard assessment dict with updated float
        values.
    :rtype: dict
    """
    _key = ""
    for _idx in [0, 1, 2]:
        try:
            _key = list(fha.keys())[_idx]
            fha[_key] = float(floats[_idx])
        except IndexError:
            fha[_key] = 0.0

    return fha