






import sys
import turtle



def 					_lowerCamelCase(			lowerCAmelCase__				:		tuple[float, float]    ,    lowerCAmelCase__				:		tuple[float, float]      ):





				'''simple docstring'''







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



def 					_lowerCamelCase(			lowerCAmelCase__				:		tuple[float, float]    ,    lowerCAmelCase__				:		tuple[float, float]    ,    lowerCAmelCase__				:		tuple[float, float]    ,    lowerCAmelCase__				:		int    ,    ):





				'''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        =			turtle.Turtle()
				my_pen.ht()
				my_pen.speed(5)
				my_pen.pencolor('red')

				A        =			[(-175, -125), (0, 175), (175, -125)]  # vertices of triangle
				triangle(vertices[0], vertices[1], vertices[2], int(sys.argv[1]))










import math



def 					_lowerCamelCase(			lowerCAmelCase__				:		float    ,    lowerCAmelCase__				:		float      ):





				'''simple docstring'''







				return math.pow(lowerCAmelCase__    ,    2      ) - a



def 					_lowerCamelCase(			lowerCAmelCase__				:		float      ):





				'''simple docstring'''







				return 2 * x



def 					_lowerCamelCase(			lowerCAmelCase__				:		float      ):





				'''simple docstring'''







				SCREAMING_SNAKE_CASE_   :	Optional[Any]													=   2.0

				while start <= a:
								SCREAMING_SNAKE_CASE_   :	str													=   math.pow(lowerCAmelCase__    ,    2      )

				return start



def 					_lowerCamelCase(			lowerCAmelCase__				:		float    ,    lowerCAmelCase__				:		int = 9999    ,    lowerCAmelCase__				:		float = 0.00_000_000_000_001      ):





				'''simple docstring'''







				if a < 0:
								raise ValueError('math domain error'      )

				SCREAMING_SNAKE_CASE_   :	Optional[int]													=   get_initial_point(lowerCAmelCase__      )

				for _ in range(lowerCAmelCase__      ):
								SCREAMING_SNAKE_CASE_   :	Tuple													=   value
								SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   value - fx(lowerCAmelCase__    ,    lowerCAmelCase__      ) / fx_derivative(lowerCAmelCase__      )
								if abs(prev_value - value      ) < tolerance:
												return value

				return value


if __name__ == "__main__":
				from doctest import testmod

				testmod()