rit csapx lab 1
rit csapx lab 1
Ciphers Lab 1
1/14/2025
1 Requirements
You will individually implement a program, ciphers.py, which encrypts/decrypts messages.
The program will read in from the standard input and print the results in the standard
output.
The program should execute as follows:
1. First prompt for the operation to perform. The options will be E for encryption (apply
the transformation operations to the message), D for decryption (the given transfor-
mations have already been applied to generate the message), or Q for terminating the
program.
2. If the user enters Q, the program finishes.
3. Otherwise, prompt for the message string.
4. Finally, prompt for the transformation operations string.
5. The program will send the output for the encryption/decryption process to the stan-
dard output.
6. Repeat step 1.
1
1.1 Sample Run
You have been provided with some sample files to verify the correctness of your solution.
The files in the input folder contain the input required to run the program and the files
in the output folder contain the output generated by your program when executed with its
corresponding file from the input folder.
We have provided you with files to verify every operation individually and in combination
with other operations. However, we encourage you to create your own test cases for a more
thorough testing.
After that, you can specify the full path to any file with the required input. For example,
you can run your program redirecting the input from any file from the input folder.
2
Now when your program executes an input() call it will read from the file versus asking
you for input.
3
The ultimate goal here would be to make sure the output matches exactly.
2 Implementation Details
You are not allowed to use regular expressions for this lab. Everything should be done using
str operations, e.g. slicing, concatenation, indexing, etc.
Additionally, you are not allowed to use the global keyword.
In order to receive full design points, you should be using functions to break down your
program. For example, you should have one function that parses each transformation oper-
ations string into the sequence of transformations, and a function for every transformation.
Look at your problem solving for more hints about how you can break this down to promote
function reuse.
Your program must be properly documented to receive full style credit. The program should
have a main docstring containing your name and a description of the assignment. Each
function should have a properly formatted docstring with a description, arguments, return,
etc.
You do not have to deal with erroneous input. It is assumed the user will provide valid input.
The messages and operations will be legal, and are all formatted correctly.
3 Grading
The grade breakdown for this lab is as follows:
• Problem Solving: 15%
• In-Lab Activity: 10%
• Functionality: 55%
4
– User input: 5%
– Individual encryption operations: 20%
– Overall encryption process: 15%
– Decryption process: 15%
• Design: 10% - Your implementation uses functions to promote code reuse.
• Code Style and Documentation: 10%
4 Submission
Go to your project’s src folder and zip it up. Rename the zip file to lab1.zip. Upload this
zip to the MyCourses Assignment dropbox by the due date.
• To zip on Windows, right click on the src folder and select Send to -> Compressed
(zipped) folder.
• To zip on MacOS, right click on the src folder and select Compress "src".