'''simple docstring'''


import math


def  _lowerCamelCase   (				):



     """simple docstring"""





     UpperCAmelCase_							:       Tuple       =				input('Enter message: '       )
     UpperCAmelCase_							:       Dict       =				int(input(F'''Enter key [2-{len(lowerCamelCase_       ) - 1}]: '''       )       )
     UpperCAmelCase_							:       str       =				input('Encryption/Decryption [e/d]: '       )

     if mode.lower().startswith('e'       ):
          UpperCAmelCase_							:       List[Any]       =				encrypt_message(lowerCamelCase_     ,					lowerCamelCase_       )
     elif mode.lower().startswith('d'       ):
          UpperCAmelCase_							:       Tuple       =				decrypt_message(lowerCamelCase_     ,					lowerCamelCase_       )

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


def  _lowerCamelCase   (				lowerCamelCase_ :							int     ,					lowerCamelCase_ :							str       ):



     """simple docstring"""





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


def  _lowerCamelCase   (				lowerCamelCase_ :							int     ,					lowerCamelCase_ :							str       ):



     """simple docstring"""





     UpperCAmelCase_							:       str       =				math.ceil(len(lowerCamelCase_       ) / key       )
     UpperCAmelCase_							:       Optional[int]       =				key
     UpperCAmelCase_							:       Tuple       =				(num_cols * num_rows) - len(lowerCamelCase_       )
     UpperCAmelCase_							:       Union[str, Any]       =				[''] * num_cols
     UpperCAmelCase_							:       int       =				0
     UpperCAmelCase_							:       Union[str, 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_							:       str       =				0
               row += 1

     return "".join(lowerCamelCase_       )


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 main()







'''simple docstring'''


def  _lowerCamelCase   (				lowerCamelCase_ :							int     ,					lowerCamelCase_ :							int       ):



     """simple docstring"""





     return int(input_a == input_a == 0       )


def  _lowerCamelCase   (				):



     """simple docstring"""





     print('Truth Table of NOR Gate:'       )
     print('|   Input 1   |  Input 2  | Output |'       )
     print(F'''|      0      |    0      |  {nor_gate(0     ,					0       )}     |'''       )
     print(F'''|      0      |    1      |  {nor_gate(0     ,					1       )}     |'''       )
     print(F'''|      1      |    0      |  {nor_gate(1     ,					0       )}     |'''       )
     print(F'''|      1      |    1      |  {nor_gate(1     ,					1       )}     |'''       )


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 main()






