
'''simple docstring'''




def 		lowerCAmelCase_				(   snake_case__		,				snake_case__						):




    '''simple docstring'''



    if discount_rate < 0:
        raise ValueError('''Discount rate cannot be negative'''						)
    if not cash_flows:
        raise ValueError('''Cash flows list cannot be empty'''						)
    A       :   List[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'''






lowerCAmelCase__											=	'''Input must be a string of 8 numbers plus letter'''
lowerCAmelCase__											=	'''TRWAGMYFPDXBNJZSQVHLCKE'''


def 		_A     (    A__      ):






 """simple docstring"""



 if not isinstance(A__     ,				A__      ):
  __lowercase							  = F"Expected string as input, found {type(A__      ).__name__}"
  raise TypeError(A__      )

 __lowercase							  = spanish_id.replace('''-'''     ,				''''''      ).upper()
 if len(A__      ) != 9:
  raise ValueError(A__      )

 try:
  __lowercase							  = int(spanish_id_clean[0:8]      )
  __lowercase							  = spanish_id_clean[8]
 except ValueError as ex:
  raise ValueError(A__      ) from ex

 if letter.isdigit():
  raise ValueError(A__      )

 return letter == LOOKUP_LETTERS[number % 23]


if __name__ == "__main__":
 import doctest

 doctest.testmod()

