Morse Code Ecoding Using Python Dictionary Definition: MorseCode= {"A":".-", "B": "-...", "C": "-.-.", "D": "-..", "E": ".", "F": "..-.", "G": "--.", "H": "....","I": "..", "J": ".---", "K": "-.-", "L": ".-..", "M": "--", "N": "-.", "O": "---", "P": ".--.","Q":"--.-", "R":".-.", "S":"...", "T":"-", "U":"..-", "V":"...-", "W":".--", "X":"-..-", "Y": "-.--", "Z": "--..", "1": ".----", "2": "..---", "3": "...--", "4": "....-", "5": ".....","6":"-....","7": "--...", "8": "---..", "9": "----.", "0": "-----", ".": ".-.-.-", "’": ".----.", " ": " "}; Morse Code Ecoding Using a String Array For C or Python: const char* MorseCode[] ={".-", "-...", "-.-.","-..", ".", "..-.", "--.","....","..",".---","-.-",".-..","--","-.", "---",".--.","--.-",".-.","...","-","..-","...-", ".--","-..-","-.--","--..",".----","..---","...--", "....-", ".....","-....","--...","---..","----.", "-----" }; const char *Ptext= "SOS"; ............................................................................................ MorseCode[] is a constant array of Morse Code characters (dods & dashes) defined has strings. MorseCode[0] is the string ".-", the Morse Code for A. The ASCII value of A is 65. Subtracting 65 from the ASCII value of A gives 0, the index of the first element of the array. The Morse codes for each of the charters of Ptext = "SOS" can be obtained by subtracting 65 from their ASCII value. However, if Ptext contains ASCII digits 0 to 9 their ASCII values must be translated to produce an array index that follow the Z.