This script is made using Python 3. It takes the choice from the user, to encrypt or decrypt the input text, and a shift value (offset) to do the corresponding function.
After taking the required inputs from the user, the script iterates through each character in the string and checks whether the character is an alphabet or not.
If yes, then we find the ASCII value of the character and add/subtract the shift value in order to get the offset value. Then finally print the shifted character in the output console.
If the character is not an alphabet, it's printed as it is.
- Download and install the latest version of Python.
- Download and save the script.
- Navigate to where you have saved it and open a terminal there.
- Run
python script.pyin your terminal orpython3 script.pyif you have Python 2 installed as well. - Enter the choice, whether you want to encrypt(1) or decrypt(2) the text.
- Input the text string you want to be processed and the offset.
- Some Input/Output examples:
Check out my Github profile: Advik Singhania!

