Question: Mixer The first program you will write shall be named mixer.py. The job of this program will be to encrypt (mix or jumble) the lines

 Mixer The first program you will write shall be named mixer.py.

The job of this program will be to encrypt (mix or "jumble")

the lines of a text file, but do it in such a

Mixer The first program you will write shall be named mixer.py. The job of this program will be to encrypt (mix or "jumble") the lines of a text file, but do it in such a way that it can be un-done later with a separate program (which you will also write). When run, your program will first request a file to encrypt. Requesting the file name will look like Enter a nane of a python program to mix: X This program will then run it's encrypting (mixing) algorithm on the text file g. It will save the mixed version of the program to a file named ted.txt At this point you might be asking, how does the mixing work? And how can I mix in such a way that it can be undone by another program? Your program will "mix an input file by randomly re-arranging the lines of the input file. For example, you might request that xerpyencrypt a python file named get-credentials.py that looks like this lget the usernane from a prompt username raw_input ("Login: >") llist of allowed users user1 Jack" user 2 1i11" lcontrol that the user belongs to the list of allowed users if usernane user1: print "Access granted" elif usernane user2: print Welcome to the systen" else print "Access denied You then run mixer.py and request that it mix this file Enter a nane of a python program to mix: get-credentials.py After running. encrytd.txt will have the following contents Il have the following contents ted.txt

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!