"""simple docstring"""




from __future__ import annotations






def      UpperCAmelCase    (		UpperCamelCase__				,			UpperCamelCase__ ):






							"""simple docstring"""





							A__		   =							0
							A__		   =							len(_lowerCamelCase ) - 1

							while i < j:
														if nums[i] + nums[j] == target:
																					return [i, j]
														elif nums[i] + nums[j] < target:
																					A__		   =							i + 1
														else:
																					A__		   =							j - 1

							return []


if __name__ == "__main__":
				import doctest

				doctest.testmod()
				print(F'''{two_pointer([2, 7, 11, 15], 9) = }''')










'''simple docstring'''




def 				lowerCAmelCase_   (	_lowerCamelCase:   float       ,      _lowerCamelCase:   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"""					)
		__SCREAMING_SNAKE_CASE       :		List[str]           =		sum(
		    cash_flow / ((1 + discount_rate) ** i) for i, cash_flow in enumerate(_lowerCamelCase					)					)
		return round(_lowerCamelCase       ,      ndigits=2					)


if __name__ == "__main__":
						import doctest

						doctest.testmod()