DEV Community

Brian Bethencourt for CodeNewbie

Posted on

Weekly Challenge #2 - Dot Dash Decode

Morse code is a method of transmitting text information as a series of on-off tones, lights, or pulses. It uses a standardized sequence of short and long elements to represent individual letters, numbers, and some punctuation.

This week's programming challenge is to build an app that can either encode text into Morse code or decode Morse code into text.

For this challenge, you must build an app that can take user input either through the spacebar on a keyboard or by clicking a mouse and convert it to Morse code. Alternatively, you could build an app that translates Morse code input into regular text. The app should be able to handle capital letters, numbers, and some punctuation.

Here's a hint! The typical way to program this app is to store the Morse code equivalents for each character in a dictionary or list. Then you'll need to write logic to convert the user's input into Morse code using those equivalents. For example, when the user enters a "T", the app would convert that to "- " representing the short and long Morse code tones for the letter T.

This is a great challenge for practicing your logic and dictionary skills in any programming language. Feel free to build the app using the language and tools of your choice. Share your GitHub repo or CodePen link in the comments below!

Good luck and happy coding!

The Fastest, Most Accurate API for Voice AI

Ad Image

Power your Conversational AI with the most accurate real-time speech-to-text API. Available in 50 languages and at <1-second latency. Perfect for building seamless and emotionally intelligent voice experiences.

Start building today 🛠️

Top comments (0)

Thank you for being supportive of code newbies!

It is hard to learn to code. It is hard to get your first job. It is hard to make it in tech.

Thank you to everyone who shows support to newbies in our industry!

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay