Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 582 Bytes

morse.md

File metadata and controls

23 lines (14 loc) · 582 Bytes

Convert Text to Morse Code

Tags: minimicro, farmtronics, commandline

Create a program that takes a string as input and ouputs it in Morse code, printing "." for each dot and "-" for each dash, with spaces between the letters.

Example:

Input: Hello
Output: .... . .-.. .-.. ---
Hints

Use input to get the input string.

Use a map to store and fetch morse code versions of letters.

Push the code for each letter onto a list, and use join to convert that list to a string.