






from math import pi, sqrt

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

def     snake_case   ()			->							None:
  assert gamma(0.5    ) == sqrt(UpperCAmelCase__    )
  assert gamma(1    ) == 1.0
  assert gamma(2    ) == 1.0


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

   testmod()
   A_						:						Union[str, Any]						      =					1.0
   while num:
      A_						:						str						      =					float(input('Gamma of: '))
      print(F'''gamma({num}) = {gamma(num)}''')
      print('\nEnter 0 to exit...')

'''simple docstring'''
from string import ascii_lowercase, ascii_uppercase







def 		A_(     A						:		str):
							if not sentence:
														return ""
							UpperCamelCase   			=     dict(zip(A		,     A))
							return lower_to_upper.get(sentence[0]		,     sentence[0]) + sentence[1:]


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

						testmod()




