



'''simple docstring'''





def snake_case_    (				lowercase__      ,					lowercase__ = 1_0_0_0		):
  if (not isinstance(__snake_case      ,					__snake_case		)) or (digit_position <= 0):
    raise ValueError("Digit position must be a positive integer"		)
  elif (not isinstance(__snake_case      ,					__snake_case		)) or (precision < 0):
    raise ValueError("Precision must be a nonnegative integer"		)

  # compute an approximation of (16 ** (n - 1)) * pi whose fractional part is mostly
  # accurate
  UpperCAmelCase__			:				str												=       (
      4 * _subsum(__snake_case      ,					1      ,					__snake_case		)
      - 2 * _subsum(__snake_case      ,					4      ,					__snake_case		)
      - _subsum(__snake_case      ,					5      ,					__snake_case		)
      - _subsum(__snake_case      ,					6      ,					__snake_case		)
  )

  # return the first hex digit of the fractional part of the result
  return hex(int((sum_result % 1) * 1_6		)		)[2:]







def snake_case_    (				lowercase__      ,					lowercase__      ,					lowercase__		):
  UpperCAmelCase__			:				List[str]												=       0.0
  for sum_index in range(digit_pos_to_extract + precision		):
    UpperCAmelCase__			:				Optional[int]												=       8 * sum_index + denominator_addend
    if sum_index < digit_pos_to_extract:
      # if the exponential term is an integer and we mod it by the denominator
      # before dividing, only the integer part of the sum will change;
      # the fractional part will not
      UpperCAmelCase__			:				Any												=       pow(
          1_6      ,					digit_pos_to_extract - 1 - sum_index      ,					__snake_case		)
    else:
      UpperCAmelCase__			:				Dict												=       pow(1_6      ,					digit_pos_to_extract - 1 - sum_index		)
    total += exponential_term / denominator
  return total


if __name__ == "__main__":
      import doctest

      doctest.testmod()





'''simple docstring'''





def snake_case_    (				lowercase__      ,					lowercase__ = 1_3		):
  UpperCAmelCase__			:				Optional[Any]												=       ""
  for c in s:
    if "A" <= c <= "Z":
      out += chr(ord("A"		) + (ord(lowercase__		) - ord("A"		) + n) % 2_6		)
    elif "a" <= c <= "z":
      out += chr(ord("a"		) + (ord(lowercase__		) - ord("a"		) + n) % 2_6		)
    else:
      out += c
  return out







def snake_case_    (				):
  UpperCAmelCase__			:				Dict												=       input("Enter message: "		)

  UpperCAmelCase__			:				Optional[int]												=       dencrypt(lowercase__      ,					1_3		)
  print("Encryption:"      ,					lowercase__		)

  UpperCAmelCase__			:				Union[str, Any]												=       dencrypt(lowercase__      ,					1_3		)
  print("Decryption: "      ,					lowercase__		)


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      main()



