Giter Club home page Giter Club logo

github-lab's Introduction

Caesar Cipher

This code takes two arguments from the command line: a string of text to encrypt and the number of positions to shift each letter by. The program then encrypts the text using the Caesar Cipher method and prints the result to the console. The encrypted text is printed in blocks of five letters and a maximun of 10 blocks per line.

About Caesar Cipher

This cipher is a type of substitution cipher. The idea of a Caesar cipher is this: you encode a message by shifting each letter some number of places. Thus, if the shift is 2, then A becomes C, B becomes D, and so on. Like this:

Example of Caesar Cipher

How To Use

  1. Clone the repository:

    git clone https://github.com/luminaa/github-lab
  2. Then go to the file directory:

    cd ./github-lab
  3. To use caesar.py, run it from the command line and provide the string to encrypt and the number of positions to shift as arguments. For example:

    python caesar.py "Encrypt this text" 3

    The above command will encrypt the string "Encrypt this text" using a shift of 3 and print the encrypted result to the console. This would be "HQFUB SWWKL VWHAW"

  4. Alternatively, you can use the bash script caesar.sh. (THIS ONLY WORKS FOR LINUX AND MAC) First, you have to make it executable. Run the following command in your shell.

    chmod +x caesar.sh

    After that, you can run the script by typing the following command:

    ./caesar.sh

github-lab's People

Contributors

rahualrai avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.