pyBegin / projects / caesar-cipher
🔐

Caesar Cipher

A console implementation of the classic Caesar cipher. It encodes or decodes a message by shifting each letter a chosen number of positions through…

82 linesRunnable

Caesar Cipher

A console implementation of the classic Caesar cipher. It encodes or decodes a message by shifting each letter a chosen number of positions through the alphabet.

Example

Type 'encode' to encrypt, type 'decode' to decrypt:
encode
Type your message:
hello world
Type the shift number:
3
the encoded message is khoor zruog

Running it again with decode, the same message khoor zruog, and shift 3 gives back hello world.

How to run on localhost

python caesar-cipher.py

Dependencies

Standard library only.