Created
December 18, 2016 14:48
-
-
Save madranet/f3ce599f96848a58b27afe9294e00846 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#try morse | |
print("\n===========================================================") | |
print("OPTION01 —MORSE") | |
print("===========================================================\n") | |
for section in message: | |
#take 3 letters at a time and convert to morse | |
# then join 3 morse letters together to create braille letter | |
brailleletter = (morse[section[0]]+morse[section[1]]+morse[section[2]]) | |
#lookup braille letter | |
try: | |
print((list(braille.keys())[list(braille.values()).index(brailleletter)]),end="") | |
#if it doesn't exist, print '?' | |
except: | |
print("?",end="") | |
print("\n\n===========================================================\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment