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, 25.06.2019 04:00
What was the name of the first computer (machine) language?
Answers: 2
question
Computers and Technology, 25.06.2019 10:30
Tools used in a particular career depend on the tasks performed. true or false
Answers: 1
question
Computers and Technology, 25.06.2019 11:30
How do you put a picture with your question? i need to put a picture with my question
Answers: 1
question
Computers and Technology, 25.06.2019 21:00
People might use a word processing program to: a communicate with people b create and edit text documents c edit video d sort and organize information to reference later
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, 18.11.2020 01:00
Questions on the website: 13722363