Skip to content

The Morse Decoder is a Python program that allows users to encode English text into Morse code and decode Morse code back into English. The program provides a command-line interface for the user to interact with. The conversion between English text and Morse code is based on a dictionary mapping the characters to their corresponding Morse codes.

Notifications You must be signed in to change notification settings

oiivantsov/morse-decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Morse Decoder

Python

Morse Decoder is a Python program that allows you to encode English text into Morse code and decode Morse code back into English. It provides a command-line interface for easy interaction and supports basic punctuation marks, numbers, and uppercase letters.

Features

  • Encode English text into Morse code.
  • Decode Morse code into English text.
  • Preserve spaces between words during encoding and decoding.
  • Handle invalid inputs gracefully and skip unrecognized characters or codes.
  • Copy the result to the clipboard for easy sharing and pasting.

Installation

  1. Clone the repository

  2. Install the required pyperclip dependencies (to copy the coding result):

$ pip install pyperclip

Usage

  • Follow the prompts to encode or decode your text using Morse code. Enter '0' to encode or '1' to decode.
  • For encoding, provide the text you want to convert into Morse code. For decoding, enter the Morse code, separating letters with '|' and words with spaces.
  • After encoding or decoding, you will be prompted to copy the result to the clipboard. Enter 'Yes' or 'No' to proceed.

Contributing

Contributions to Morse Decoder are welcome! If you have any ideas, improvements, or bug fixes, please submit a pull request. For major changes, please open an issue first to discuss the proposed changes.

MISC

Data provided by http://introcs.cs.princeton.edu/java/data/

About

The Morse Decoder is a Python program that allows users to encode English text into Morse code and decode Morse code back into English. The program provides a command-line interface for the user to interact with. The conversion between English text and Morse code is based on a dictionary mapping the characters to their corresponding Morse codes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages