






_a    :   dict[str, float]        =			{
    "joule": 1.0,
    "kilojoule": 1000,
    "megajoule": 100_0000,
    "gigajoule": 10_0000_0000,
    "wattsecond": 1.0,
    "watthour": 3600,
    "kilowatthour": 360_0000,
    "newtonmeter": 1.0,
    "calorie_nutr": 4186.8,
    "kilocalorie_nutr": 418_6800.00,
    "electronvolt": 1.602_176_634e-19,
    "britishthermalunit_it": 1055.0_5585,
    "footpound": 1.3_5_5_8_1_8,
}


def 				snake_case__							(							UpperCAmelCase							:  str    ,			UpperCAmelCase							:  str    ,			UpperCAmelCase							:  float       ):
    if to_type not in ENERGY_CONVERSION or from_type not in ENERGY_CONVERSION:
        lowerCAmelCase__   :int      							=				(
            F'''Incorrect \'from_type\' or \'to_type\' value: {from_type!r}, {to_type!r}\n'''
            F'''Valid values are: {", ".join(UpperCAmelCase       )}'''
        )
        raise ValueError(UpperCAmelCase       )
    return value * ENERGY_CONVERSION[from_type] / ENERGY_CONVERSION[to_type]


if __name__ == "__main__":
 import doctest

 doctest.testmod()











def 				snake_case__							(							UpperCAmelCase							:  float    ,			UpperCAmelCase							:  list[float]       ):
    if discount_rate < 0:
        raise ValueError("Discount rate cannot be negative"       )
    if not cash_flows:
        raise ValueError("Cash flows list cannot be empty"       )
    lowerCAmelCase__   :List[Any]      							=				sum(
        cash_flow / ((1 + discount_rate) ** i) for i, cash_flow in enumerate(UpperCAmelCase       )       )
    return round(UpperCAmelCase    ,			ndigits=2       )


if __name__ == "__main__":
 import doctest

 doctest.testmod()



