




from __future__ import annotations



def 							_A       (						lowerCAmelCase_					: int = 4      ):
     """simple docstring"""

     lowerCAmelCase__          =			abs(lowerCAmelCase_      ) or 4
     return [[1 + x + y * row_size for x in range(lowerCAmelCase_      )] for y in range(lowerCAmelCase_      )]



def 							_A       (						lowerCAmelCase_					: list[list[int]]      ):
     """simple docstring"""

     return reverse_row(transpose(lowerCAmelCase_      )      )
     # OR.. transpose(reverse_column(matrix))



def 							_A       (						lowerCAmelCase_					: list[list[int]]      ):
     """simple docstring"""

     return reverse_row(reverse_column(lowerCAmelCase_      )      )
     # OR.. reverse_column(reverse_row(matrix))



def 							_A       (						lowerCAmelCase_					: list[list[int]]      ):
     """simple docstring"""

     return reverse_column(transpose(lowerCAmelCase_      )      )
     # OR.. transpose(reverse_row(matrix))



def 							_A       (						lowerCAmelCase_					: list[list[int]]      ):
     """simple docstring"""

     lowerCAmelCase__          =			[list(lowerCAmelCase_      ) for x in zip(*lowerCAmelCase_      )]
     return matrix



def 							_A       (						lowerCAmelCase_					: list[list[int]]      ):
     """simple docstring"""

     lowerCAmelCase__          =			matrix[::-1]
     return matrix



def 							_A       (						lowerCAmelCase_					: list[list[int]]      ):
     """simple docstring"""

     lowerCAmelCase__          =			[x[::-1] for x in matrix]
     return matrix



def 							_A       (						lowerCAmelCase_					: list[list[int]]      ):
     """simple docstring"""

     for i in matrix:
          print(*lowerCAmelCase_      )


if __name__ == "__main__":
     UpperCamelCase								=					make_matrix()
     print('\norigin:\n')
     print_matrix(matrix)
     print('\nrotate 90 counterclockwise:\n')
     print_matrix(rotate_aa(matrix))

     UpperCamelCase								=					make_matrix()
     print('\norigin:\n')
     print_matrix(matrix)
     print('\nrotate 180:\n')
     print_matrix(rotate_aaa(matrix))

     UpperCamelCase								=					make_matrix()
     print('\norigin:\n')
     print_matrix(matrix)
     print('\nrotate 270 counterclockwise:\n')
     print_matrix(rotate_aaa(matrix))






from math import pi, sqrt



def 							_A       (						lowerCAmelCase_					: float      ):
     """simple docstring"""

     if num <= 0:
          raise ValueError("math domain error"      )
     if num > 171.5:
          raise OverflowError("math range error"      )
     elif num - int(lowerCAmelCase_      ) not in (0, 0.5):
          raise NotImplementedError("num must be an integer or a half-integer"      )
     elif num == 0.5:
          return sqrt(lowerCAmelCase_      )
     else:
          return 1.0 if num == 1 else (num - 1) * gamma(num - 1      )



def 							_A       (						):
     """simple docstring"""

     assert gamma(0.5      ) == sqrt(lowerCAmelCase_      )
     assert gamma(1      ) == 1.0
     assert gamma(2      ) == 1.0


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

     testmod()
     UpperCamelCase								=					1.0
     while num:
          UpperCamelCase								=					float(input('Gamma of: '))
          print(F"""gamma({num}) = {gamma(num)}""")
          print('\nEnter 0 to exit...')
