
'''simple docstring'''
def 		A_(     A						:		list):
							for i in range(len(A) - 1		,     0		,     -1):
														UpperCamelCase   			=     False

														for j in range(A		,     0		,     -1):
																					if unsorted[j] < unsorted[j - 1]:
																												UpperCamelCase			,	UpperCamelCase   			=     unsorted[j - 1], unsorted[j]
																												UpperCamelCase   			=     True

														for j in range(A):
																					if unsorted[j] > unsorted[j + 1]:
																												UpperCamelCase			,	UpperCamelCase   			=     unsorted[j + 1], unsorted[j]
																												UpperCamelCase   			=     True

														if not swapped:
																					break
							return unsorted


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						lowerCAmelCase					:    Union[str, Any]           = input('Enter numbers separated by a comma:\n').strip()
						lowerCAmelCase					:    int           = [int(item) for item in user_input.split(',')]
						print(f"""{cocktail_shaker_sort(unsorted) = }""")





'''simple docstring'''

def __UpperCamelCase( _A       :					float	,      _A       :					list[float]     ):
   '''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'''     )
   UpperCAmelCase__				:					str 					=	sum(
       cash_flow / ((1 + discount_rate) ** i) for i, cash_flow in enumerate(_A     )     )
   return round(_A	,      ndigits=2     )


if __name__ == "__main__":
  import doctest

  doctest.testmod()




