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
- Host: GitHub
- URL: https://github.com/naemazam/text-to-morse
- Owner: naemazam
- Created: 2021-11-20T18:03:32.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-20T18:09:36.000Z (almost 4 years ago)
- Last Synced: 2025-01-14T13:57:09.268Z (9 months ago)
- Topics: morse-code, morse-code-python, morse-learning, morse-translator, morsecode, naemazam
- Homepage:
- Size: 1000 Bytes
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 Yououtput
```python
T _
H ....
A ._
N _.
K _._
_______________Y _.__
O ___
U .._
```## Contributing
Contributions are always welcome!