




import sys
import turtle



def       UpperCAmelCase__  (     lowerCamelCase,			lowerCamelCase   ):
  return (pa[0] + pa[0]) / 2, (pa[1] + pa[1]) / 2



def       UpperCAmelCase__  (     lowerCamelCase,			lowerCamelCase,			lowerCamelCase,			lowerCamelCase,			):
  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>"
          )
     _UpperCAmelCase	:						int			=     turtle.Turtle()
     my_pen.ht()
     my_pen.speed(5)
     my_pen.pencolor("red")

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









from collections import defaultdict

from graphs.minimum_spanning_tree_prims import prisms_algorithm as mst



def       UpperCAmelCase__  (     ):
  lowercase	,    lowercase    :Union[str, Any]      	=						9, 14  # noqa: F841
  lowercase    :Optional[Any]      	=						[
      [0, 1, 4],
      [0, 7, 8],
      [1, 2, 8],
      [7, 8, 7],
      [7, 6, 1],
      [2, 8, 2],
      [8, 6, 6],
      [2, 3, 7],
      [2, 5, 4],
      [6, 5, 2],
      [3, 5, 14],
      [3, 4, 9],
      [5, 4, 10],
      [1, 7, 11],
  ]

  lowercase    :Optional[Any]      	=						defaultdict(lowerCamelCase   )
  for nodea, nodea, cost in edges:
    adjancency[nodea].append([nodea, cost]   )
    adjancency[nodea].append([nodea, cost]   )

  lowercase    :Optional[int]      	=						mst(lowerCamelCase   )

  lowercase    :Any      	=						[
      [7, 6, 1],
      [2, 8, 2],
      [6, 5, 2],
      [0, 1, 4],
      [2, 5, 4],
      [2, 3, 7],
      [0, 7, 8],
      [3, 4, 9],
  ]

  for answer in expected:
    lowercase    :Any      	=						tuple(answer[:2]   )
    lowercase    :str      	=						tuple(edge[::-1]   )
    assert edge in result or reverse in result



