Skip to content

Julian-Nash/python-morse-code-translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Python Morse Code translator

Translates text to morse code and morse code to text using a small set of International morse code. Includes a small suite of basic tests.

Usage

After cloning this repo, run:

python example.py

Output:

- .... .. ...   ... - .-. .. -. --.   .... .- ...   -... . . -.   - .-. .- -. ... .-.. .- - . -..   - ---   -- --- .-. ... .   -.-. --- -.. .   .- -. -..   -... .- -.-. -.-   .- --. .- .. -.
this string has been translated to morse code and back again

Feel free to change the text in the example. The example calls translate_morse using the output of translate_text, which is provided with a string.

Tests

To run the tests:

python tests.py

About

A simple Python Morse code translator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages