subject

Objectives: The purpose of this assignment is to practice dictionary usage and file reading and writing. The assignment will give you another chance to use files for input and output. Since this is the last assignment, we will keep it very simple and short. [2] Description: There are two files to read from: a codebook and a message file. The codebook will encrypt a letter with another letter. Use the codebook to encrypt the message. The codebook and the paragraph to be encrypted will be given in two separate files. You can hardwire the two input file name in the program and output the encrypted paragraph to the console. If a letter is not given in the codebook, leave it as-is in the encrypted paragraph. For example, if the codebook includes three lines below: a:e e:c c:a If the paragraph to be encrypted is "It's a nice day!". The encrypted output should be: "It's e niac dey!". The following is what the algorithm should look like in the main program. • Build the codebook (as a dict) • Print the codebook in a table form • Read the message • Print the message • Encrypt the message • Print the encrypted message [3] Requirements: Clearly, you will need to write four functions according to the algorithms above. Assume the codebook is correct, i. e, you will be able to decode the message. Decoding is NOT a requirement of this assignment. No error checking is required.
[3] Input and Output: See the sample output. The TA may test the program with a different codebook or message.
[4] Deadline: Midnight, Monday, May 3, 2021. No late assignment will be accepted for this one. code book. txt message. txt An operating system (OS) is system software that manages computer hardware, software resources and provides common services for computer programs. cid di 11 be eto hib y! try X:0 OS SIA TIP Pin tro ort ** Letter to Code d -> 1 -> 9 -> y => 1 A-> X X-> 0 ->S -> A -> P P.-> * Original message: An operating system (051 is system software that sanages computer hardware, software resources, and provides common services for computer programs. ... Encrypted message: Xp Engefosph titog (SA) st titog ttcourt oto nfphet at nuoge beweg. tt. config rotturdgt. fplntvalgt dtamtp teevadgt ett dtmnoge netheint.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:20
Amedian in the road will be marked with a white sign that has a black arrow going to the left of the median. true false
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Jason needs to learn a new web tool. he went through his books to understand more about it. now he wants hands-on experience with using that tool. what would him? jason can use websites where workspace is provided to test the results of your code.
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
Martha is designing a single-player game. her manager suggests that she plan the design to incorporate future modifications. which principle of game design relates to planning for future modifications?
Answers: 1
question
Computers and Technology, 23.06.2019 07:10
If you want to import a picture into a dtp application, what must you do first? draw an image frame. import text. open the folder containing the file. select get image… from the windows menu.
Answers: 2
You know the right answer?
Objectives: The purpose of this assignment is to practice dictionary usage and file reading and writ...
Questions
question
Mathematics, 24.08.2021 17:20
question
History, 24.08.2021 17:20
question
Social Studies, 24.08.2021 17:20
question
Advanced Placement (AP), 24.08.2021 17:20
question
Arts, 24.08.2021 17:20
Questions on the website: 13722367