Question: In Python, do a basic encryption of a text file in the following manner. The program encrypt.py will read in the following text file and

In Python, do a basic encryption of a text file in the following manner. The program encrypt.py will read in the following text file and rearrange the lines in the file randomly and save the rearranged lines of txt to another file called encrypted.txt. It will also save another file called key.txt that will contain the index of the lines that were rearranged in the encrypted file, so for example if the 4th line from the original file is now the 1st line in the encrypted file then the first index in the key will say 4 and so on. Next write a program called decrypt.py that reads the encrypted.txt and key.txt files and decrypts it to print the contents of the original file. So in short all you will be submitting is the encrypt.py and decrypt.py files as part of this assignment.

In Python, do a basic encryption of a text file in the

lest-Nctepo Who said, It is Just as I icared! Two Owls and Hen a Wren Have ! built their nests in lay board! O lype hene to search

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!