Morse Code Encoder Decoder | Python

Publicado el: 13 febrero 2021
en el canal de: Indian Tech
1,381
16

Python program to implement Morse Code Translator.
'cipher' - 'stores the Morse translated form of the English string'
'decipher' - 'stores the English translated form of the Morse string'
'citext' - 'stores Morse code of a single character'
'i' - 'keeps count of the spaces between Morse characters'
'message' - 'stores the string to be encoded or decoded'

MORSE_CODE_DICT = { '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':'-----', ', ':'--..--', '.':'.-.-.-',
'?':'..--..', '/':'-..-.', '-':'-....-',
'(':'-.--.', ')':'-.--.-'}

Stay tuned till next time.
Happy coding.
As always code is on GitHub:
https://github.com/ultimus11/morse-co...
  / sahil43463216  
  / sahil_panindre  
Have a look at my python 21 days beginner to advance series on following Instagram handle:
  / indian__tech__  


En esta página del sitio puede ver el video en línea Morse Code Encoder Decoder | Python de Duración online en buena calidad , que subió el usuario Indian Tech 13 febrero 2021, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 1,381 veces y le gustó 16 a los espectadores. Disfruta viendo!