Passwordify

The questions below are due on Thursday June 17, 2021; 11:00:00 AM.
 
You are not logged in.

Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.mit.edu) to authenticate, and then you will be redirected back to this page.

You decide you need to make your passwords more secure. You come up with a simple algorithm to transform your old string passwords into new strings. Here you'll implement that algorithm.

Write a program which makes the following character replacements in a string:

  • Any occurence of `'o'` should become `'0'`.
  • Any occurence of `'e'` should become `'3'`
  • Any occurence of `'i'` should become `'!'` You should not replace any other characters (even, for example, uppercase `'O'`, `'E'`, or `'I'` characters).1

    The first line of your program should set up a variable password to hold the input string. For example:

    password = 'iLoveDogs123'
    

    Your program should print the resulting new password. For example, it would print the following string:

    '!L0v3D0gs123'
    

    Once you've tested your code by hand, upload your file for testing:

      No file selected


     
    Footnotes

    1Disclaimer: this algorithm is far from sufficient to create safe passwords! Wikipedia gives good guidelines to protect yourself. (click to return to text)