

from __future__ import annotations

import math

def 						UpperCamelCase					(lowercase_: Any    ,      lowercase_: List[str]					)     ->      Optional[Any]:
	A__							:    Any        =		u
	for i in range(1    ,      __lowerCamelCase					):
		A__							:    int        =		temp * (u - i)
	return temp

def 						UpperCamelCase					()     ->      Optional[int]:
	A__							:    str        =		int(input("""enter the numbers of values: """					)					)
	A__							:    list[list[float]]        =		[]
	for _ in range(__lowerCamelCase					):
		y.append([]					)
	for i in range(__lowerCamelCase					):
		for j in range(__lowerCamelCase					):
			y[i].append(__lowerCamelCase					)
			A__							:    Tuple        =		0

	print("""enter the values of parameters in a list: """					)
	A__							:    Union[str, Any]        =		list(map(__lowerCamelCase    ,      input().split()					)					)

	print("""enter the values of corresponding parameters: """					)
	for i in range(__lowerCamelCase					):
		A__							:    int        =		float(input()					)

	A__							:    Tuple        =		int(input("""enter the value to interpolate: """					)					)
	A__							:    Tuple        =		(value - x[0]) / (x[1] - x[0])

	# for calculating forward difference table

	for i in range(1    ,      __lowerCamelCase					):
		for j in range(n - i					):
			A__							:    Union[str, Any]        =		y[j + 1][i - 1] - y[j][i - 1]

	A__							:    Optional[int]        =		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()





"""simple docstring"""





from __future__ import annotations







def 	__a     (		__lowerCamelCase,		__lowerCamelCase,		__lowerCamelCase  ):
   if (voltage, current, resistance).count(0  ) != 1:
      raise ValueError("One and only one argument must be 0"  )
   if resistance < 0:
      raise ValueError("Resistance cannot be negative"  )
   if voltage == 0:
      return {"voltage": float(current * resistance  )}
   elif current == 0:
      return {"current": voltage / resistance}
   elif resistance == 0:
      return {"resistance": voltage / current}
   else:
      raise ValueError("Exactly one argument must be 0"  )


if __name__ == "__main__":
    import doctest

    doctest.testmod()


