





import argparse


_a						=   "docs/source/_static/js/custom.js"





def lowerCAmelCase__(__snake_case							)       ->   Tuple:







	'''simple docstring'''







	with open(__snake_case ,encoding='''utf-8''' ,newline='''\n'''							) as f:
		lowerCamelCase__              =	f.readlines()
	lowerCamelCase__              =	0

	# First let's put the right version
	while not lines[index].startswith('''const stableVersion ='''							):
		index += 1
	lowerCamelCase__              =	F'const stableVersion = "v{version}"\n'

	# Then update the dictionary
	while not lines[index].startswith('''const versionMapping = {'''							):
		index += 1

	# We go until the end
	while not lines[index].startswith('''}'''							):
		index += 1
	# We add the new version at the end
	lines[index - 1] += F'    "v{version}": "v{version}",\n'

	with open(__snake_case ,'''w''' ,encoding='''utf-8''' ,newline='''\n'''							) as f:
		f.writelines(__snake_case							)


if __name__ == "__main__":
			_a						=   argparse.ArgumentParser()
			parser.add_argument("--version", help="Release version.")
			_a						=   parser.parse_args()
			update_custom_js(args.version)










from __future__ import annotations





def lowerCAmelCase__(__snake_case ,__snake_case ,__snake_case							)       ->   float:







	'''simple docstring'''







	if days_between_payments <= 0:
		raise ValueError('''days_between_payments must be > 0'''							)
	if daily_interest_rate < 0:
		raise ValueError('''daily_interest_rate must be >= 0'''							)
	if principal <= 0:
		raise ValueError('''principal must be > 0'''							)
	return principal * daily_interest_rate * days_between_payments





def lowerCAmelCase__(__snake_case ,__snake_case ,__snake_case ,)       ->   float:







	'''simple docstring'''







	if number_of_compounding_periods <= 0:
		raise ValueError('''number_of_compounding_periods must be > 0'''							)
	if nominal_annual_interest_rate_percentage < 0:
		raise ValueError('''nominal_annual_interest_rate_percentage must be >= 0'''							)
	if principal <= 0:
		raise ValueError('''principal must be > 0'''							)

	return principal * (
	    (1 + nominal_annual_interest_rate_percentage) ** number_of_compounding_periods
	    - 1
	)





def lowerCAmelCase__(__snake_case ,__snake_case ,__snake_case ,)       ->   float:







	'''simple docstring'''







	if number_of_years <= 0:
		raise ValueError('''number_of_years must be > 0'''							)
	if nominal_annual_percentage_rate < 0:
		raise ValueError('''nominal_annual_percentage_rate must be >= 0'''							)
	if principal <= 0:
		raise ValueError('''principal must be > 0'''							)

	return compound_interest(
	    __snake_case ,nominal_annual_percentage_rate / 365 ,number_of_years * 365							)


if __name__ == "__main__":
			import doctest

			doctest.testmod()



