





'''simple docstring'''






from __future__ import annotations

import math







def 					_a						(       _lowerCamelCase    ,	_lowerCamelCase ) ->				float:



			"""simple docstring"""


			__snake_case					:      Any							      =     u
			for i in range(1    ,	_lowerCamelCase ):
						__snake_case					:      Optional[Any]							      =     temp * (u - i)
			return temp







def 					_a						(       ) ->				None:



			"""simple docstring"""


			__snake_case					:      str							      =     int(input("""enter the numbers of values: """ ) )
			__snake_case					:      list[list[float]]							      =     []
			for _ in range(_lowerCamelCase ):
						y.append([] )
			for i in range(_lowerCamelCase ):
						for j in range(_lowerCamelCase ):
									y[i].append(_lowerCamelCase )
									__snake_case					:      Any							      =     0

			print("""enter the values of parameters in a list: """ )
			__snake_case					:      Dict							      =     list(map(_lowerCamelCase    ,	input().split() ) )

			print("""enter the values of corresponding parameters: """ )
			for i in range(_lowerCamelCase ):
						__snake_case					:      Optional[int]							      =     float(input() )

			__snake_case					:      List[str]							      =     int(input("""enter the value to interpolate: """ ) )
			__snake_case					:      int							      =     (value - x[0]) / (x[1] - x[0])

			# for calculating forward difference table

			for i in range(1    ,	_lowerCamelCase ):
						for j in range(n - i ):
									__snake_case					:      List[Any]							      =     y[j + 1][i - 1] - y[j][i - 1]

			__snake_case					:      Union[str, Any]							      =     y[0][0]
			for i in range(1    ,	_lowerCamelCase ):
						summ += (ucal(_lowerCamelCase    ,	_lowerCamelCase ) * y[0][i]) / math.factorial(_lowerCamelCase )

			print(F'''the value at {value} is {summ}''' )


if __name__ == "__main__":
	main()







def 	SCREAMING_SNAKE_CASE_							(	_snake_case	:list				)  ->     bool:
   if not isinstance(_snake_case	,   _snake_case				):
      raise ValueError('''Input series is not valid, valid series - [2, 4, 6]'''				)
   if len(_snake_case				) == 0:
      raise ValueError('''Input list must be a non empty list'''				)
   if len(_snake_case				) == 1:
      return True
   _A      =       series[1] - series[0]
   for index in range(len(_snake_case				) - 1				):
      if series[index + 1] - series[index] != common_diff:
         return False
   return True

def 	SCREAMING_SNAKE_CASE_							(	_snake_case	:list				)  ->     float:
   if not isinstance(_snake_case	,   _snake_case				):
      raise ValueError('''Input series is not valid, valid series - [2, 4, 6]'''				)
   if len(_snake_case				) == 0:
      raise ValueError('''Input list must be a non empty list'''				)
   _A      =       0
   for val in series:
      answer += val
   return answer / len(_snake_case				)


if __name__ == "__main__":
   import doctest

   doctest.testmod()



