To find the position for a letter in the tree, scan the code and branch left for a dot and branch right for a dash. Encode a message by replacing each letter by its code symbol. Then decode the ...
The morse code binary tree in the program is explicitly build inside the morse module. To make use of the available functions, morse module has to be import into the main environment.
We talk about Morse code, named after its inventor, Samuel Morse. However, maybe we should call it Vail code after Alfred Vail, who may be its real inventor. Haven’t heard of him? You aren’t ...