<

Challenge 1

User Image Log-in
with Discord

Part One:
Morse De-Code

Welcome to your first day aboard the STS Solara, where you'll be venturing into the vastness of space for the very first time. After settling into your cabin, your next stop is to meet with the Officer on Deck, who will provide you with your inaugural job assignment.

To your surprise, you find yourself entrusted with the important task of communications decoding in the Comms Bay, despite your limited experience in the field. You recall that a significant portion of space communication is conducted using Morse Code.

Although you've heard of Morse Code in passing, your understanding of it is a bit hazy. With a sense of urgency, you frantically search your desk drawer, and lo and behold! Serendipity leads you to a weathered booklet with yellowing pages titled "Deciphering Morse Code" a TopNet (_ ___ .__. _. . _) Retroflex Inc. Publication. Inside, you discover a comprehensive table containing Letter-to-Morse Code translations, along with a detailed guide on how your machine interprets the input code:

  • Letters in the words will be separated by spaces
  • Words will be separated by new lines(\n)
  • Dashes (dahs) will be represented by underscore characters (_)
  • Dots (dits) will be represented by decimal point characters (.)
  • Dots and dashes for each letter or character will not have spaces between them
LetterCodeLetterCodeLetterCode
A._K_._U.._
B_...L._..V..._
C_._.M__W.__
D_..N_.X_.._
E.O___Y_.__
F.._.P.__.Z__..
G__.Q__._.._._._
H....R._.?..__..
I..S...!_._.__
J.___T_-_...._

For example:

.._. .. ._. ... _
_.. ._ .__ _.

results in "FIRST DAWN".

Each word is separated by a new line character and each letter in the words "FIRST" and "DAWN" are separated by a space, but there are no spaces between the Morse Code dashes and dots of individual letters:

You decide that you should quickly make a Python script which reads the input from the machine and decodes the Morse Code into text. Just in time, too, because the first message is already coming in...

Decode the message: