Skip to content

Python program for Morse code translation: Converts text to Morse code and decodes Morse code to text. User-friendly tool for Morse code enthusiasts and learners.

Notifications You must be signed in to change notification settings

cosmic-striker/morses-code-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Morse Code Encoder/Decoder

This is a simple Python-based Morse code encoder and decoder. The program allows users to input either a string of text or Morse code, and it will convert the input to the opposite format (from text to Morse code, or from Morse code to text).

Features

  • Encode: Convert plain text (letters, numbers, and space) into Morse code.
  • Decode: Convert Morse code back into plain text.
  • Supports: Lowercase and uppercase letters (both treated the same), numbers (0-9), and spaces.

Usage

  1. Run the Program: Simply run the script, and you'll be prompted to either encode or decode a message.

  2. Encoding:

    • To encode a message, input any combination of letters, numbers, or spaces.
    • The program will convert the message into Morse code, with each Morse code symbol separated by a space.
  3. Decoding:

    • To decode a Morse code message, input a string of Morse code symbols. Symbols should be separated by spaces.
    • The program will convert the Morse code back into the original message.
  4. Exit:

    • To exit the program, type # when prompted.

How to Run

  1. Ensure you have Python installed (version 3.x is recommended).

  2. Copy the code from morse_code.py (or your script) into a Python file.

  3. Open a terminal or command prompt and navigate to the directory containing the Python script.

  4. Run the program using:

    python morse_code.py

About

Python program for Morse code translation: Converts text to Morse code and decodes Morse code to text. User-friendly tool for Morse code enthusiasts and learners.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages