





"""simple docstring"""





import math


def       lowerCamelCase_       (   )						->None:





  """simple docstring"""


  __UpperCAmelCase    :						Optional[Any]       =						input('''Enter message: '''  )
  __UpperCAmelCase    :						str       =						int(input(f'''Enter key [2-{len(UpperCAmelCase_  ) - 1}]: '''  )  )
  __UpperCAmelCase    :						Optional[int]       =						input('''Encryption/Decryption [e/d]: '''  )

  if mode.lower().startswith('''e'''  ):
    __UpperCAmelCase    :						Optional[int]       =						encrypt_message(UpperCAmelCase_  ,			UpperCAmelCase_  )
  elif mode.lower().startswith('''d'''  ):
    __UpperCAmelCase    :						Optional[int]       =						decrypt_message(UpperCAmelCase_  ,			UpperCAmelCase_  )

  # Append pipe symbol (vertical bar) to identify spaces at the end.
  print(f'''Output:\n{text + '|'}'''  )


def       lowerCamelCase_       (   UpperCAmelCase_  ,			UpperCAmelCase_  )						->str:





  """simple docstring"""


  __UpperCAmelCase    :						Dict       =						[''''''] * key
  for col in range(UpperCAmelCase_  ):
    __UpperCAmelCase    :						str       =						col
    while pointer < len(UpperCAmelCase_  ):
      cipher_text[col] += message[pointer]
      pointer += key
  return "".join(UpperCAmelCase_  )


def       lowerCamelCase_       (   UpperCAmelCase_  ,			UpperCAmelCase_  )						->str:





  """simple docstring"""


  __UpperCAmelCase    :						Dict       =						math.ceil(len(UpperCAmelCase_  ) / key  )
  __UpperCAmelCase    :						Union[str, Any]       =						key
  __UpperCAmelCase    :						str       =						(num_cols * num_rows) - len(UpperCAmelCase_  )
  __UpperCAmelCase    :						Tuple       =						[''''''] * num_cols
  __UpperCAmelCase    :						Tuple       =						0
  __UpperCAmelCase    :						Any       =						0

  for symbol in message:
    plain_text[col] += symbol
    col += 1

    if (
        (col == num_cols)
        or (col == num_cols - 1)
        and (row >= num_rows - num_shaded_boxes)
    ):
      __UpperCAmelCase    :						List[str]       =						0
      row += 1

  return "".join(UpperCAmelCase_  )


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  main()






"""simple docstring"""





def       lowerCamelCase_       (   UpperCAmelCase_  )						->float:





  """simple docstring"""


  return 10 - x * x


def       lowerCamelCase_       (   UpperCAmelCase_  ,			UpperCAmelCase_  )						->float:





  """simple docstring"""


  if equation(UpperCAmelCase_  ) * equation(UpperCAmelCase_  ) >= 0:
    raise ValueError('''Wrong space!'''  )

  __UpperCAmelCase    :						Tuple       =						a
  while (b - a) >= 0.01:
    # Find middle point
    __UpperCAmelCase    :						List[str]       =						(a + b) / 2
    # Check if middle point is root
    if equation(UpperCAmelCase_  ) == 0.0:
      break
    # Decide the side to repeat the steps
    if equation(UpperCAmelCase_  ) * equation(UpperCAmelCase_  ) < 0:
      __UpperCAmelCase    :						Union[str, Any]       =						c
    else:
      __UpperCAmelCase    :						str       =						c
  return c


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  print(bisection(-2, 5))
  print(bisection(0, 6))