-
Create a method to decode a Morse code character, takes a string parameter, and return the corresponding character in uppercase (e.g. decode_char(".-") returns "A").
-
Create a method to decode an entire word in Morse code, takes a string parameter, and return the string representation. Every character in a word will be separated by a single space (e.g. decode_word("-- -.--") returns "MY").
-
Create a method to decode the entire message in Morse code, takes a string parameter, and return the string representation. Every word will be separated by 3 spaces (e.g.
decode("-- -.-- -. .- -- .")
returns "MY NAME").
-
Reuse methods whenever possible. Make sure that your code is DRY.
-
Once your code is ready use it to decode the message from the old bottle:
.- -... --- -..- ..-. ..- .-.. .-.. --- ..-. / .-. ..- -... .. . ...
This repository includes files with plain SQL that can be used to recreate a database:
- Use this to view the code and methods.
👤 Sylvestre
- GitHub: @pasytchangwa
- Twitter: @Sylvest10415595
- LinkedIn: LinkedIn
👤 Moses
- GitHub: @githubhandle
- LinkedIn: LinkedIn
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!