


"""simple docstring"""
class      _UpperCAmelCase					:






		'''simple docstring'''

		def __init__(self   ):





			'''simple docstring'''

			__snake_case      :		Tuple         =							[0, 1]



		def 							SCREAMING_SNAKE_CASE    (self							,			a_   ):





			'''simple docstring'''

			if (difference := index - (len(self.sequence   ) - 2)) >= 1:
				for _ in range(a_   ):
					self.sequence.append(self.sequence[-1] + self.sequence[-2]   )
			return self.sequence[:index]






def 						lowercase				(	)	->None:
	"""simple docstring"""





	print(
	    '''Fibonacci Series Using Dynamic Programming\n'''	,  '''Enter the index of the Fibonacci number you want to calculate '''	,  '''in the prompt below. (To exit enter exit or Ctrl-C)\n'''	,  sep=''''''	,  )
	__snake_case      :		Optional[Any]         =							Fibonacci()

	while True:
		__snake_case      :		str         =							input('''>> '''	)
		if prompt in {"exit", "quit"}:
			break

		try:
			__snake_case      :		int         =							int(_snake_case	)
		except ValueError:
			print('''Enter a number or \'exit\''''	)
			continue

		print(fibonacci.get(_snake_case	)	)


if __name__ == "__main__":
			main()






"""simple docstring"""







def   __lowerCAmelCase(		__UpperCAmelCase      ):






	"""simple docstring"""





	if len(__UpperCAmelCase      ) > 1:
		_lowercase			:     Dict      					=				len(__UpperCAmelCase      ) // 2  # Finds the middle of the array
		_lowercase			:     List[str]      					=				arr[
		    :middle_length
		]  # Creates an array of the elements in the first half.
		_lowercase			:     Optional[int]      					=				arr[
		    middle_length:
		]  # Creates an array of the elements in the second half.
		_lowercase			:     Optional[Any]      					=				len(__UpperCAmelCase      )
		_lowercase			:     Optional[int]      					=				len(__UpperCAmelCase      )
		merge(__UpperCAmelCase      )  # Starts sorting the left.
		merge(__UpperCAmelCase      )  # Starts sorting the right
		_lowercase			:     Dict      					=				0  # Left Counter
		_lowercase			:     List[str]      					=				0  # Right Counter
		_lowercase			:     Optional[Any]      					=				0  # Position Counter
		while (
		    left_index < left_size and right_index < right_size
		):  # Runs until the lowers size of the left and right are sorted.
			if left_array[left_index] < right_array[right_index]:
				_lowercase			:     Optional[int]      					=				left_array[left_index]
				left_index += 1
			else:
				_lowercase			:     int      					=				right_array[right_index]
				right_index += 1
			index += 1
		while (
		    left_index < left_size
		):  # Adds the left over elements in the left half of the array
			_lowercase			:     Any      					=				left_array[left_index]
			left_index += 1
			index += 1
		while (
		    right_index < right_size
		):  # Adds the left over elements in the right half of the array
			_lowercase			:     str      					=				right_array[right_index]
			right_index += 1
			index += 1
	return arr


if __name__ == "__main__":
						import doctest

						doctest.testmod()



