Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Morse code #1

Merged
merged 4 commits into from
Jan 2, 2023
Merged

Morse code #1

merged 4 commits into from
Jan 2, 2023

Conversation

NahnahAJ
Copy link
Owner

Project Requirements

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

    .- -... --- -..- ..-. ..- .-.. .-.. --- ..-. .-. ..- -... .. . ...
    You can use IRB for that :)

@NahnahAJ NahnahAJ merged commit 9451e52 into develop Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant