Write a program that receives a coded message file(Lab3ExtraCreditCT.txt) from your local espionage agent and decodes it into a file using standard English. The problem is your agent forgot to tell you the key used to decode the message. Fortunately, this is a simple substitution code consistently using 1 alphanumeric character to represent another, this is case sensitive. All other characters are not substituted, so a space will always be a space, a – will always be a –, a @ will always be a @, etcetera. You may use the following table to help you, it contains the most common letters used in the English language in descending order. E A R I O T N S L C U D P M H G B F Y W K V X Z J Q 0 5 3 2 4 6 8 1 9 7 Using the following key to convert plaintext to coded text: Plaintext = Now is the time for all good men to come to the aid of their country. Key = THEQUICKBROWNFXJMPSVLAZYDG The file your program outputs should look like this: Coded Text = Fxz bs vku vbnu ixp tww cxxq nuf vx exnu vx vku tbq xi vkubp exlfvpd. Vice versa, using coded text with the same key reverses the message back to plaintext. Plaintext = Fxz bs vku vbnu ixp tww cxxq nuf vx exnu vx vku tbq xi vkubp exlfvpd. Key = THEQUICKBROWNFXJMPSVLAZYDG The file your program outputs should look like this: Coded Text = Now is the time for all good men to come to the aid of their country. ----- Please show exactly how it is with images attached!
Write a
E A R I O T N S L C U D P M H G B F Y W K V X Z J Q 0 5 3 2 4 6 8 1 9 7
Using the following key to convert plaintext to coded text:
Plaintext = Now is the time for all good men to come to the aid of their country.
Key = THEQUICKBROWNFXJMPSVLAZYDG
The file your program outputs should look like this:
Coded Text = Fxz bs vku vbnu ixp tww cxxq nuf vx exnu vx vku tbq xi vkubp exlfvpd.
Vice versa, using coded text with the same key reverses the message back to plaintext.
Plaintext = Fxz bs vku vbnu ixp tww cxxq nuf vx exnu vx vku tbq xi vkubp exlfvpd.
Key = THEQUICKBROWNFXJMPSVLAZYDG
The file your program outputs should look like this:
Coded Text = Now is the time for all good men to come to the aid of their country.
-----
Please show exactly how it is with images attached!
![Encoding run
Enter the name of the input file or enter
"Lab3ExtraCreditPT.txt":'~
to use
Enter the name of the Key file or enter "~" to use
"Lab3ExtraCreditKEY.txt": -
Enter the name of the output file or enter "~" to use
"Lab3ExtraCreditCT.txt": -
Enter "E" to Encode the output from the input, or
enter "D" to _Decode the input to the output: E
Encrypting file.
Successfully read and translated 9231 characters.
Press any key to Exit.
11 | Page
Lab 3 Assignment
Decoding run
Enter the name of the input file or enter "~" to use
"Lab3ExtracreditPT.txt": Lab3ExtraCreditCT.txt
Enter the name of the Key file or enter "~" to use
"Lab3ExtracreditKEY.txt": ~
Enter the name of the output file or enter "~" to use
"Lab3ExtracreditCT.txt": Lab3ExtraCreditPT.txt
Enter "E" to Encode the output from the input, or
enter "D" to Decode the input to the output: d
Decrypting file.
Successfully read and translated 69 characters.
Press any key to Exit.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fef635ede-f29a-44aa-84fb-c4f8d227cce1%2F87d869d0-26f5-4947-acc7-166c5ac881df%2Fmmduq3f_processed.png&w=3840&q=75)
![Sample Test Files
| Lab3ExtraCreditPT.bxt - Notepad
File Edit Format View Help
Now is the time for all good men to come to the aid of their country.
| Lab3ExtraCreditKEY.bxt - Notepad
O X
File Edit Format View Help
THEQUICKBROWNFXJMPSVLAZYDGthequickbrownfxjmpsvlazydg9876543210
Lab3ExtraCreditCT.txt - Notepad
File Edit Format View Help
Fxz bs vku vbnu ixp tww cxxq nuf vx exnu vx vku tbq xi vkubp exlfvpd.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fef635ede-f29a-44aa-84fb-c4f8d227cce1%2F87d869d0-26f5-4947-acc7-166c5ac881df%2Fu7g179f_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)