


'''simple docstring'''



from __future__ import annotations

import math



def      UpperCAmelCase__   (      UpperCAmelCase_       :							float ,       UpperCAmelCase_       :							int				)	->						float:
     __lowerCamelCase  :      Union[str, Any]														=						u
     for i in range(1 ,       UpperCAmelCase_				):
          __lowerCamelCase  :      Any														=						temp * (u - i)
     return temp



def      UpperCAmelCase__   (      )	->						None:
     __lowerCamelCase  :      List[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  :      Tuple														=						0

     print('enter the values of parameters in a list: '				)
     __lowerCamelCase  :      int														=						list(map(UpperCAmelCase_ ,       input().split()				)				)

     print('enter the values of corresponding parameters: '				)
     for i in range(UpperCAmelCase_				):
          __lowerCamelCase  :      Union[str, Any]														=						float(input()				)

     __lowerCamelCase  :      str														=						int(input('enter the value to interpolate: '				)				)
     __lowerCamelCase  :      Tuple														=						(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  :      List[str]														=						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 sys
import turtle






def     a     (		lowerCamelCase_						,  lowerCamelCase_							):






				'''simple docstring'''
				return (pa[0] + pa[0]) / 2, (pa[1] + pa[1]) / 2






def     a     (		lowerCamelCase_						,  lowerCamelCase_						,  lowerCamelCase_						,  lowerCamelCase_						,  ):






				'''simple docstring'''
				my_pen.up()
				my_pen.goto(vertexa[0]						,  vertexa[1]							)
				my_pen.down()
				my_pen.goto(vertexa[0]						,  vertexa[1]							)
				my_pen.goto(vertexa[0]						,  vertexa[1]							)
				my_pen.goto(vertexa[0]						,  vertexa[1]							)

				if depth == 0:
								return

				triangle(lowerCamelCase_						,  get_mid(lowerCamelCase_						,  lowerCamelCase_							)						,  get_mid(lowerCamelCase_						,  lowerCamelCase_							)						,  depth - 1							)
				triangle(lowerCamelCase_						,  get_mid(lowerCamelCase_						,  lowerCamelCase_							)						,  get_mid(lowerCamelCase_						,  lowerCamelCase_							)						,  depth - 1							)
				triangle(lowerCamelCase_						,  get_mid(lowerCamelCase_						,  lowerCamelCase_							)						,  get_mid(lowerCamelCase_						,  lowerCamelCase_							)						,  depth - 1							)


if __name__ == "__main__":
							if len(sys.argv) != 2:
														raise ValueError(
														    'Correct format for using this script: '
														    'python fractals.py <int:depth_for_fractal>'
														)
							A__      :     Dict       =					turtle.Turtle()
							my_pen.ht()
							my_pen.speed(5)
							my_pen.pencolor('red')

							A__      :     Union[str, Any]       =					[(-1_75, -1_25), (0, 1_75), (1_75, -1_25)]  # vertices of triangle
							triangle(vertices[0], vertices[1], vertices[2], int(sys.argv[1]))




