Skip to content

Purvaambre/caesar-cipher-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Caesar Cipher (Python)

This project is a simple implementation of the Caesar Cipher, one of the oldest and most basic encryption techniques.
It allows the user to encrypt or decrypt a message by shifting letters of the alphabet by a fixed number.

This project was created as part of my Python learning journey and helped me understand string manipulation and encryption logic.


🔐 What is Caesar Cipher?

The Caesar Cipher works by shifting each letter in a message by a certain number of positions in the alphabet.

Example (Shift = 3): encoding A → D B → E C → F


🛠 Concepts Used

  • for loops
  • if / else conditions
  • Strings and indexing
  • Modulo operator %
  • Basic encryption & decryption logic
  • User input handling

▶️ How the Program Works

  1. The user chooses whether to encrypt or decrypt
  2. The user enters a message
  3. The user enters a shift number
  4. The program shifts each letter accordingly
  5. The encrypted or decrypted message is displayed

▶️ How to Run the Program

  1. Make sure Python is installed
  2. Download or clone this repository
  3. Run the program using:
python caesar_cipher.py

About

A beginner-friendly Python implementation of the Caesar Cipher for encrypting and decrypting text using shift logic.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages