View the step-by-step solution to:

Morse Code Encryption/Decryption Program Develop and test a Python program that allows a user to open a text file containing a simple message using...

Morse Code Encryption/Decryption Program

Develop and test a Python program that allows a user to open a text file containing a simple message using only the (uppercase) letters A . . . Z, and saves a Morse code version of the message, that is, containing only the characters dash ('' - ''), dot ('' . ''). In the encoded version, put the encoding of each character on its own line in the text file. Use a blank line to indicate the end of a word, and two blank lines to indicate the end of a sentence. your program should be able to both convert an English message file into Morse code, and Morse code file into English. The Morse code for each letter is given below.



A . _ N _ .

B _ . . . O _ _ _

C _ . _ . P . _ _ .

D _ . . Q _ _ . _

E . R . _ .

F . . _ . S . . .

G _ _ . T _

H . . . . U . . _

I . . V . . . _

J . _ _ _ W . _ _

K _ . _ X _ . . _

L . _ . . Y _ . _ _

M _ _ Z _ _ . .

Top Answer

OUTPUT: Encrypted message: __. _.. .._. __. ....  __. .___ .._. __.  _.. .._. .... _._ .___ _.__ .._  ..._ __. .___ __.... View the full answer

morseoutput.PNG

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online