Question: Create a dictionary with the following key-value pairs. (a and A both map to @) Character Replacements: a, A - @ e - 3 i

Create a dictionary with the following key-value pairs. (a and A both map to @)

Character Replacements: a, A - @ e - 3 i - 1 o - 0 (i.e. a zero) u - v c - ( s - $ Your program should then read each line in the input file (input.txt), replace the characters as shown (using the dictionary you created), and write the modified Words to another file (OutReplace.txt).

Input.txt contents: Then it all crashes down And you break your crown And you point your finger But theres no one around Just want one thing Just to play the king But the castles crumbled And youre left with just a name Wheres your crown, King Nothing?

So, your OutReplace.txt file should look like: th3n 1t @ll (r@$h3$ d0wn @nd y0v br3@k y0vr (r0wn @nd y0v p01nt y0vr f1ng3r Bvt th3r3$ n0 0n3 @r0vnd Jv$t w@nt 0n3 th1ng Jv$t t0 pl@y th3 k1ng Bvt th3 (@$tl3$ (rvmbl3d @nd y0vr3 l3ft w1th jv$t @ n@m3 Wh3r3$ y0vr (r0wn, K1ng N0th1ng?

I am pretty lost trying to figure this out currently, I need the full python code from start to finish in order to solve this.

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!