Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions