An open API service indexing awesome lists of open source software.

https://github.com/naemazam/text-to-morse

Morse code is a method used in telecommunication to encode text characters as standardized sequences of two different signal durations, called dots and dashes, or dits and dahses. In here,Convert Text to Morse Code With Python
https://github.com/naemazam/text-to-morse

morse-code morse-code-python morse-learning morse-translator morsecode naemazam

Last synced: 3 months ago
JSON representation

Morse code is a method used in telecommunication to encode text characters as standardized sequences of two different signal durations, called dots and dashes, or dits and dahses. In here,Convert Text to Morse Code With Python

Awesome Lists containing this project

README

          


Text to Morse


Convert Text to Morse Code With Python


## Simple Knowledge

Morse code is a method used in telecommunication to encode text characters as standardized sequences of two different signal durations, called dots and dashes, or dits and dahs. Morse code is named after Samuel Morse, one of the inventors of the telegraph.

## Python Code

Enter a Text to convert into MC

Copy code and test on Any Editor

```Python

Text = input()
print('YOUR TEXT ',Text,' IN MORSE IS ::')
print('')
for i in Text:
i = i.upper()
if (i == 'A'):
print(i , '._')
elif (i == 'B'):
print(i , '_...')
elif (i == 'C'):
print(i , '_._.')
elif (i == 'D'):
print(i , '_..')
elif (i == 'E'):
print(i , '.')
elif (i == 'F'):
print(i , '.._.')
elif (i == 'G'):
print(i , '__.')
elif (i == 'H'):
print(i , '....')
elif (i == 'I'):
print(i , '..')
elif (i == 'J'):
print(i , '.___')
elif (i == 'K'):
print(i , '_._')
elif (i == 'L'):
print(i , '._..')
elif (i == 'M'):
print(i , '__')
elif (i == 'N'):
print(i , '_.')
elif (i == 'O'):
print(i , '___')
elif (i == 'P'):
print(i , '.__.')
elif (i == 'Q'):
print(i , '__._')
elif (i == 'R'):
print(i , '._.')
elif (i == 'S'):
print(i , '...')
elif (i == 'T'):
print(i , '_')
elif (i == 'U'):
print(i ,'.._')
elif (i == 'V'):
print(i ,'..._')
elif (i == 'W'):
print(i ,'.__')
elif (i == 'X'):
print(i ,'_.._')
elif (i == 'Y'):
print(i ,'_.__')
elif (i == 'Z'):
print(i ,'__..')
elif (i == ' '):
print('_______________')
else:
print('______')

print('____________________________')

print('_____________________')
print('Finished......#######')
```

## Demo
Input Thank You

output

```python
T _
H ....
A ._
N _.
K _._
_______________

Y _.__
O ___
U .._
```

## Contributing

Contributions are always welcome!