m05e5 / decode_morse_message

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Decode a Morse code message

  • 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:

    .- -... --- -..- ..-. ..- .-.. .-.. --- ..-. / .-. ..- -... .. . ...

Getting Started

This repository includes files with plain SQL that can be used to recreate a database:

  • Use this to view the code and methods.

Authors

👤 Sylvestre

👤 Moses

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

About


Languages

Language:Ruby 100.0%