





'''simple docstring'''





from __future__ import annotations

import math


def  SCREAMING_SNAKE_CASE   ( _UpperCAmelCase		,			_UpperCAmelCase				)    ->  float:
    lowerCamelCase__					:   Tuple      				=	u
    for i in range(1		,			_UpperCAmelCase				):
        lowerCamelCase__					:   Dict      				=	temp * (u - i)
    return temp


def  SCREAMING_SNAKE_CASE   ( )    ->  None:
    lowerCamelCase__					:   Optional[Any]      				=	int(input('enter the numbers of values: '				)				)
    lowerCamelCase__					:   list[list[float]]      				=	[]
    for _ in range(_UpperCAmelCase				):
        y.append([]				)
    for i in range(_UpperCAmelCase				):
        for j in range(_UpperCAmelCase				):
            y[i].append(_UpperCAmelCase				)
            lowerCamelCase__					:   Optional[int]      				=	0

    print('enter the values of parameters in a list: '				)
    lowerCamelCase__					:   List[Any]      				=	list(map(_UpperCAmelCase		,			input().split()				)				)

    print('enter the values of corresponding parameters: '				)
    for i in range(_UpperCAmelCase				):
        lowerCamelCase__					:   str      				=	float(input()				)

    lowerCamelCase__					:   int      				=	int(input('enter the value to interpolate: '				)				)
    lowerCamelCase__					:   int      				=	(value - x[0]) / (x[1] - x[0])

    # for calculating forward difference table

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

    lowerCamelCase__					:   Optional[int]      				=	y[0][0]
    for i in range(1		,			_UpperCAmelCase				):
        summ += (ucal(_UpperCAmelCase		,			_UpperCAmelCase				) * y[0][i]) / math.factorial(_UpperCAmelCase				)

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


if __name__ == "__main__":
    main()












import enum
import shutil
import sys


_UpperCAmelCase     ,_UpperCAmelCase       : List[Any]			     =       shutil.get_terminal_size()

_UpperCAmelCase       : Union[str, Any]			     =       {"""UP""": """A""", """DOWN""": """B""", """RIGHT""": """C""", """LEFT""": """D"""}

class      lowerCAmelCase							(      enum.Enum    ):
 UpperCAmelCase__									=	0
 UpperCAmelCase__									=	1


def  SCREAMING_SNAKE_CASE   ( _UpperCAmelCase		,			_UpperCAmelCase=""				)    ->  int:
    sys.stdout.write(str(_UpperCAmelCase				) + end				)
    sys.stdout.flush()


def  SCREAMING_SNAKE_CASE   ( _UpperCAmelCase		,			_UpperCAmelCase		,			_UpperCAmelCase=""				)    ->  Union[str, Any]:
    forceWrite(F"""\u001b[{color}m{content}\u001b[0m"""		,			_UpperCAmelCase				)


def  SCREAMING_SNAKE_CASE   ( )    ->  Dict:
    forceWrite('\r'				)


def  SCREAMING_SNAKE_CASE   ( _UpperCAmelCase		,			_UpperCAmelCase				)    ->  Optional[Any]:
    forceWrite(F"""\033[{num_lines}{CURSOR_TO_CHAR[direction.upper()]}"""				)


def  SCREAMING_SNAKE_CASE   ( )    ->  int:
    forceWrite(' ' * TERMINAL_WIDTH				)
    reset_cursor()


def  SCREAMING_SNAKE_CASE   ( )    ->  Optional[Any]:
    reset_cursor()
    forceWrite('-' * TERMINAL_WIDTH				)





