Txtcodec ======== .. toctree:: :maxdepth: 1 Indices and tables ------------------ * :ref:`genindex` * :ref:`modindex` * :ref:`search` Background ---------- Encrypting messages to prevent eavesdropping started thousands of years ago. One simple method of encryption os the substitution cipher, where one letter is replaced with another and the length of the string is maintained. An example of this is `ROT13 `_. Exercise -------- Implement a program to encode and decode messages using a substitution cipher. The program should allow the user to: 1) Indicate which operation to perform (encrypt, decrypt) 2) Read the message to encrypt / decrypt from the command line 3) Print the output message to the terminal Hints ----- The string class is your friend. Review the :py:mod:`sys` package for details on using :py:data:`sys.argv` as a simple way to get the command line arguments. Solution -------- When you are ready to see one possible solution, try :download:`this file ` .. _wikipedia_rot13: https://en.wikipedia.org/wiki/ROT13