Commit fda181df authored by root's avatar root

word to morse code

parent 21b64c7d
morse_code=[".","-",".-","-.","--","..","...","---","..-","-..","-.-",".-.","--..","..--",".-.-","-.-.","----","....","-----",".....","--...","...--","-....",".----",".-.-.","-.-.-"]
s="SWEETY"
for char in s:
v=ord(char)
index=v-65
print morse_code[index]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment