title: Python: Having trouble with a code for class
body: <p><strong>Prompt:</strong>
  Many user-created passwords are simple and easy to guess. Write a program that takes a simple password and makes it stronger by replacing characters using the key below, and by appending &quot;q*s&quot; to the end of the input string.</p>
  <pre><code>i becomes !
  a becomes @
  m becomes M
  B becomes 8
  o becomes .
  </code></pre>
  <p>Ex:</p>
  <pre><code>If the input is:
  mypassword
  
  the output is:
  Myp@ssw.rdq*s
  </code></pre>
  <p><strong>What I have so far:</strong></p>
  <pre><code>#assign variables
  
  word = input()
  
  password = ''
  
  #checking for and modifying user's password if containing the characters: i, a, m, B, or o
  for character in word:
  
      if(character=='i'): #if user's password contains the letter i change to !
          word += '!'
      
      elif(character=='a'): #if user's password contains the letter a change to @
          word += '@'
          
      elif(character=='m'): #if the user's password contains the letter m change to M
          word += 'M'
          
      elif(character=='B'): #if the user's password contains the letter B change to 8
          word += '8'
          
      elif(character=='o'): #if the user's password contains the letter o change to .
          word += '.'
          
  password = (word + 'qs')
  
  #output final password
  
  print(password)
  </code></pre>
  <p>My output is messed up. I input the password as mypassword and the output is mypasswordM@.qs</p>
  <p>Can someone please help me by telling me where I'm messing up?</p>