



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


if __name__ == "__main__":
    import doctest

    doctest.testmod()




'''simple docstring'''

from __future__ import annotations



def snake_case_      (					__snake_case  :							list[int | str])			->					None:
   create_state_space_tree(__snake_case	,   []	,   0	,   [0 for i in range(len(__snake_case))])



def snake_case_      (					__snake_case  :							list[int | str]	,   __snake_case  :							list[int | str]	,   __snake_case  :							int	,   __snake_case  :							list[int]	,   )			->					None:

   if index == len(__snake_case):
      print(__snake_case)
      return

   for i in range(len(__snake_case)):
      if not index_used[i]:
         current_sequence.append(sequence[i])
         lowerCAmelCase_			=      True
         create_state_space_tree(__snake_case	,   __snake_case	,   index + 1	,   __snake_case)
         current_sequence.pop()
         lowerCAmelCase_			=      False
A_     :						list[int | str]    							=[3, 1, 2, 4]
generate_all_permutations(sequence)

A_     :						list[int | str]    							=["A", "B", "C"]






generate_all_permutations(sequence_a)





