Text to Morse code converter
Just wanna share my simple text to morse code converter. For some reason, z wouldn't work so I just added an if and else condition for it since it's just the single letter that don't work.
this program is actually quite good. but i have some feedback for you:
- the function will not work if i enter capital letters
- maybe you can add a option at the back so that the user can use the translator again? you can do by squeezing your code into a function and call the function back again.
eg: def morse_code():
again = input('do you want to use the converter again? y/n')
while again == y:
for your next advancement you can use stuff like import string (string = abcd...xyz so you wont have to define alphabet), dictionaries for morseAlpha and alphabet(make a dictionary for both lowercase and upper by using acsii maybe solves the capital letter problem?)