


"""simple docstring"""







from __future__ import annotations

import matplotlib.pyplot as plt  # type: ignore
import numpy

# initial triangle of Koch snowflake
lowerCAmelCase__ 							=  numpy.array([0, 0])
lowerCAmelCase__ 							=  numpy.array([0.5, 0.8660254])
lowerCAmelCase__ 							=  numpy.array([1, 0])
lowerCAmelCase__ 							=  [VECTOR_1, VECTOR_2, VECTOR_3, VECTOR_1]
def    a__     (							SCREAMING_SNAKE_CASE       :       int							, SCREAMING_SNAKE_CASE       :       List[str]							):


  '''simple docstring'''







  lowerCAmelCase	:	Optional[Any]								=				initial_vectors
  for _ in range(lowercase_							):
    lowerCAmelCase	:	Optional[Any]								=				iteration_step(lowercase_							)
  return vectors
def    a__     (							SCREAMING_SNAKE_CASE       :       Union[str, Any]							):


  '''simple docstring'''







  lowerCAmelCase	:	List[str]								=				[]
  for i, start_vector in enumerate(vectors[:-1]							):
    lowerCAmelCase	:	List[str]								=				vectors[i + 1]
    new_vectors.append(lowercase_							)
    lowerCAmelCase	:	List[Any]								=				end_vector - start_vector
    new_vectors.append(start_vector + difference_vector / 3							)
    new_vectors.append(
        start_vector + difference_vector / 3 + rotate(difference_vector / 3							, 6_0							)							)
    new_vectors.append(start_vector + difference_vector * 2 / 3							)
  new_vectors.append(vectors[-1]							)
  return new_vectors
def    a__     (							SCREAMING_SNAKE_CASE       :       Tuple							, SCREAMING_SNAKE_CASE       :       Union[str, Any]							):


  '''simple docstring'''







  lowerCAmelCase	:	Tuple								=				numpy.radians(lowercase_							)
  lowerCAmelCase	:	str								=				numpy.cos(lowercase_							), numpy.sin(lowercase_							)
  lowerCAmelCase	:	Optional[Any]								=				numpy.array(((c, -s), (s, c))							)
  return numpy.dot(lowercase_							, lowercase_							)
def    a__     (							SCREAMING_SNAKE_CASE       :       Tuple							):


  '''simple docstring'''







  lowerCAmelCase	:	Tuple								=				plt.gca()
  axes.set_aspect("equal"							)

  # matplotlib.pyplot.plot takes a list of all x-coordinates and a list of all
  # y-coordinates as inputs, which are constructed from the vector-list using
  # zip()
  lowerCAmelCase	:	List[Any]								=				zip(*lowercase_							)
  plt.plot(lowercase_							, lowercase_							)
  plt.show()


if __name__ == "__main__":
     import doctest

     doctest.testmod()

     lowerCAmelCase__ 							=  iterate(INITIAL_VECTORS, 5)
     plot(processed_vectors)












"""simple docstring"""


import re




def        lowercase__     (       lowercase_      )       ->		bool:




      """simple docstring"""

      _UpperCamelCase   :						List[Any]    =							re.compile(
          r"^(?:0|94|\+94|0{2}94)" r"7(0|1|2|4|5|6|7|8)" r"(-| |)" r"\d{7}$"      )

      return bool(re.search(lowercase_		,lowercase_      )      )


if __name__ == "__main__":
  lowerCamelCase__						= "0094702343221"

  print(is_sri_lankan_phone_number(phone))
