Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions utilities/Morse-Code_Translator/morse_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
'Y': '-.--', 'Z': '--..',
'0': '-----', '1': '.----', '2': '..---', '3': '...--',
'4': '....-', '5': '.....', '6': '-....', '7': '--...',
'8': '---..', '9': '----.'
'8': '---..', '9': '----.', '.': '.-.-.-', '/': '-..-.',
'@': '.--.-.', '=': '-...-', '$': '...-..-', '!': '-.-.--',
'(': '-.--.', ')': '-.--.-', ',': '--..--'
}

REVERSE_MORSE_CODE_DICT = {v: k for k, v in MORSE_CODE_DICT.items()}
Expand Down Expand Up @@ -52,4 +54,4 @@ def decode_from_morse(morse):
print(f"Decoded Text:\n{decoded}")

else:
print("Invalid choice. Please run the program again and type 'E' or 'D'.")
print("Invalid choice. Please run the program again and type 'E' or 'D'.")