Hiding information is a major part of programming:

protecting passwords, establishing secure connections, and securing programs against tampering all rely on controlling access to information.

  • STEP I: Getting the user input: We need two inputs from the user- the text to be altered and the word that needs to be changed.

  • STEP II: Splitting the user input into constituent words.

  • STEP III: Now we need to read every word of the 1st text and check if it is similar to the word that needs to be changed.

  • STEP IV: Once we come across the required word, we will be replacing it with the word ‘REDACTED’.


Try in the REPL