
'''simple docstring'''






import sys
import turtle







def 		A_       (	_lowerCAmelCase   :    tuple[float, float]				,	_lowerCAmelCase   :    tuple[float, float]							):



      """simple docstring"""




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







def 		A_       (	_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>'
  )
 UpperCAmelCase_       :   str   =       turtle.Turtle()
 my_pen.ht()
 my_pen.speed(5)
 my_pen.pencolor('red')

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

'''simple docstring'''






def 		A_       (	_lowerCAmelCase   :    int							):



      """simple docstring"""




      if isinstance(_lowerCAmelCase				,	_lowerCAmelCase							):
            raise TypeError("'float' object cannot be interpreted as an integer"							)
      if isinstance(_lowerCAmelCase				,	_lowerCAmelCase							):
            raise TypeError("'str' object cannot be interpreted as an integer"							)

      if num == 0:
            return "0b0"

      _lowerCamelCase				:   Tuple								=   False

      if num < 0:
            _lowerCamelCase				:   List[Any]								=   True
            _lowerCamelCase				:   int								=   -num

      _lowerCamelCase				:   list[int]								=   []
      while num > 0:
            binary.insert(0				,	num % 2							)
            num >>= 1

      if negative:
            return "-0b" + "".join(str(_lowerCAmelCase							) for e in binary							)

      return "0b" + "".join(str(_lowerCAmelCase							) for e in binary							)


if __name__ == "__main__":
 import doctest

 doctest.testmod()