fb pixel

Morse code

The morse code has been used extensively for communication. It was the first means of communication that could delegate complex messages over long distances. Now you are asked to encode a simple English sentence into a Morse code.
notion image
Symbol
Code
Symbol
Code
Symbol
Code
A
._
N
_.
__..__
B
_...
O
___
.
._._._
C
_._.
P
.__.
?
..__..
The input contains a single line - the phrase in English.
The program should print the corresponding Morse code. Each letter needs to be separated by a space. You can separate them with multiple spaces as well.
Input
Output
How are you?
.... ___ .__ ._ ._. . _.__ ___ .._ ..__..
tasty
_ ._ ... _ _.__
RUN!
._. .._ _. _._.__
 
To check your solution you need to sign in
Sign in to continue