Skip to content

CodingDojoSilesia/morse

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

Morse code translator

Goal

Based on modification codebase and adding classes and functions you should implement a morse code translator.

You can read more here.

What you should implement

  • Stage 1: Write code for islatin and ismorse to fix tests.
  • Stage 2: Create functions and test for them to translate sentences (or for one characters).
  • Stage 3: Implement validator for latin and morse sentences.
  • Stage 4: Use your imagination (e.g. add some encryption, extend characters).

Files

  • translator.py Main code file, this is entry point of your program.
  • consts.py Here you can get mapping for morse code characters.
  • tests/test_translator.py Initial tests for program.

Implementation

You should start by read what was implemented already. Translator should detect which type of characters where provided. Try implement islatin and ismorse functions to successful detect that. Then start thinking about translating functions and what cases you should implement.

Program execution is correct when you see translated text in terminal.

How to run

  1. Install python
  2. Install pytest or pip install -r requirements.txt
  3. Run code: python translator.py 'SENTENCE' or python translator.py '... . -. - . -. -.-. .'
  4. Run tests: python -m pytest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages