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 14:30
Complete the sentence based on your knowledge of the professional difficulties faced by music artists. digital technology allows audiences to see free live telecasts of music or dance performances through
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
After you clean an engine with hot water spray, it seems to stall; when it doesn't stall, it's idling noisily. technician a says to check for loose bolts on the flex plate near the torque converter. technician b says to wipe down the spark plug wires and the distributor cap. who is correct? a. technician a b. both technicians a and b c. technician b
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
The managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an .
Answers: 3
question
Computers and Technology, 23.06.2019 09:00
Which is the highest level of the hierarchy of needs model? a. humanity b. intrapersonal c. team d. interpersonal
Answers: 1
You know the right answer?
Objectives: The purpose of this assignment is to practice dictionary usage and file reading and writ...
Questions
question
Mathematics, 11.06.2020 05:57
question
Mathematics, 11.06.2020 05:57
question
Mathematics, 11.06.2020 05:57
question
Mathematics, 11.06.2020 05:57
question
Mathematics, 11.06.2020 05:57
question
Biology, 11.06.2020 05:57
Questions on the website: 13722363