Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Caesar-Cipher

About

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.

How It Works ?

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.

Setup

  • 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.py in your terminal or python3 script.py if 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:

built by developers built with love python

Check out my Github profile: Advik Singhania!