5/5 – (1 vote)
📚 Learning Outcomes
- Accept user input through varied menu options
- Validate user input through exception handling
- Process data according to specifications
- Iterate through varied values using compound data types
- Manipulate strings and apply regular expressions
- Develop and implement user-defined classes
- Print formatted output according to given specifications
💻 Program Specifications
A cipher is an algorithm used for encrypting or decrypting information. You are being asked to design a terminal-based application for encoding and decoding text based on a provided cipher algorithm. Your application must meet the following design specifications:
- Your user interface should prompt the user to input the following information:
- Whether they would like to encode or decode their text
- Enter their text to be encoded/decoded
- Enter their cipher
- You may prompt for the input to be entered in any form or order you like, but be sure to give the user clear instructions.
- You must validate that the provided cipher is exactly 26 elements long and only contains lowercase characters from a to z or digits from 0 to 9.
- If the cipher does not meet the criteria, you must handle a ValueError exception by providing a message back to the user and allow them to re-enter their cipher without terminating the program.
- Any entered string is valid for encoding/decoding, however:
- Any punctuation/spaces/etc. within the text should be removed- only letters are encoded/decoded.
- The resulting coded or decoded message must be all lowercase letters with no spaces in between.
- Your code should include and use at least two classes of your own creation, at least three user-defined functions aside from __init__ or main(), at least one iterable object, and at least one regular expression.
- Your code must follow the conventions discussed so far in the course (nameswithunderscores, ClassNames, four spaces for indentations, spaces between variables/operators, comments throughout, etc.)
- All classes and functions must contain docstring documentation.
- Your code will be run by the TAs as your end user.
- FAQs about the assignment will be answered on the D2L discussion boards. Please check the boards for any clarifications before submitting.
- The grading rubric will be posted to D2L.
Example Tests
Text to be encoded: abcdeCipher: bcdefghijklmnopqrstuvwxyzaCode result: bcdef
Text to be decoded: abcdeCipher: bcdefghijklmnopqrstuvwxyzaCode result: zabcd
Text to be encoded: Tell me and I forget. Teach me and I remember. Involve me and I learn. Benjamin FranklinCipher: bcdefghijklmnopqrstuvwxyzaCode result: ufmmnfboejgpshfuufbdinfboejsfnfncfsjowpmwfnfboejmfbsocfokbnjogsbolmjo
Text to be decoded: uifcftuboenptucfbvujgvmuijohtjouifxpsmedboopucftffopsfwfoupvdifeuifznvtucfgfmuxjuiuififbsuifmfolfmmfsCipher: bcdefghijklmnopqrstuvwxyzaCode result: thebestandmostbeautifulthingsintheworldcannotbeseenoreventouchedtheymustbefeltwiththehearthelenkeller
📝 Assignment Tasks
- Make sure to watch video lessons 8 14 and review the corresponding Jupyter Notebooks and lab sessions.
- Clone this repository to your local computer.
- Open VSCode and start a new terminal. Make sure that your
ensf592environment is activated. encryption.pyis provided as a starting point. Fill in the header with your own information.- Remember to test your program execution via the terminal:
python encryption.py - Take a screenshot of your successful program run and upload it to your assignment repository.
- Commit your screenshot and code.
- Push your local git history to github:
git push origin main - Submit your repository HTTPS link to the Assignment 3 D2L dropbox.
- Tip: If you want to learn more about a specific aspect of a Python object, remember to take a look at the official documentation!

![[Solved] ENSF592 Assignment 3](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip.jpg)

![[Solved] ENSF592 Assignment 5](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip-1200x1200.jpg)
Reviews
There are no reviews yet.