
"""simple docstring"""

class __lowerCAmelCase						:





     def __init__(      self ):

      '''simple docstring'''




      __UpperCamelCase							    =			[0, 1]







     def 		UpperCAmelCase   (      self      ,	__UpperCAmelCase ):

      '''simple docstring'''




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






def 				A		(							) ->      Tuple:
 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=''							,   )
 __UpperCamelCase							    =			Fibonacci()

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

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

  print(fibonacci.get(lowerCamelCase_						)						)


if __name__ == "__main__":
      main()







"""simple docstring"""






def __lowercase  (   lowerCamelCase_	:   list	):
				if not isinstance(lowerCamelCase_    ,       lowerCamelCase_	):
								raise ValueError("Input series is not valid, valid series - [2, 4, 8]"	)
				if len(lowerCamelCase_	) == 0:
								raise ValueError("Input list must be a non empty list"	)
				if len(lowerCamelCase_	) == 1:
								return True
				try:
								SCREAMING_SNAKE_CASE__  				=					series[1] / series[0]
								for index in range(len(lowerCamelCase_	) - 1	):
												if series[index + 1] / series[index] != common_ratio:
																return False
				except ZeroDivisionError:
								return False
				return True


def __lowercase  (   lowerCamelCase_	:   list	):
				if not isinstance(lowerCamelCase_    ,       lowerCamelCase_	):
								raise ValueError("Input series is not valid, valid series - [2, 4, 8]"	)
				if len(lowerCamelCase_	) == 0:
								raise ValueError("Input list must be a non empty list"	)
				SCREAMING_SNAKE_CASE__  				=					1
				for value in series:
								answer *= value
				return pow(lowerCamelCase_    ,       1 / len(lowerCamelCase_	)	)


if __name__ == "__main__":
	import doctest

	doctest.testmod()
