Skip to content

karimnagdii/Morse-Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Morse Code Encryption and Decryption

This Python program allows users to encrypt English phrases into Morse code and decrypt Morse code back into English phrases. It uses a dictionary mapping English characters and digits to their respective Morse code representations. The program handles both encryption and decryption, offering a simple and effective way to convert messages between English and Morse code.

Table of Contents

Usage

  • Encryption: To encrypt an English phrase into Morse code, run the program and choose the option for encryption. Enter the English phrase, and the program will output the corresponding Morse code.

  • Decryption: To decrypt Morse code back into an English phrase, run the program and choose the option for decryption. Enter the Morse code (use spaces between letters and '/' between words), and the program will output the decrypted English phrase.

Features

  • Convert English phrases to Morse code.
  • Convert Morse code to English phrases.
  • Support for uppercase letters (A-Z), digits (0-9), and space (' ').
  • Handles multiple words and special characters.
  • User-friendly command-line interface.

How to Use

  1. Clone the Repository:
    git clone https://github.com/karimnagdii/Morse-Code.git
    cd morse-code-converter
    python morse_code.py

Examples

  1. Encryption Example:
    Enter 'E' for encryption or 'D' for decryption: E
    Enter the English phrase to encrypt: Hello World
    Morse Code: .... . .-.. .-.. --- / .-- --- .-. .-.. -..
  2. Decryption Example:
    Enter 'E' for encryption or 'D' for decryption: D
    Enter the Morse code to decrypt (use space between letters and '/' between words): .... . .-.. .-.. --- / .-- --- .-. .-.. -..
    Decrypted Message: HELLO WORLD
    

Contributing

Contributions are welcome! Please feel free to open issues or submit pull requests.

License

This project is licensed under the MIT License

MIT License

The MIT License (MIT)

Copyright (c) 2023 karim amin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages