title: I already got the answer but just curious why this method won't this work ? The output looks as if only the last if statement is valid
body: <blockquote>
  <p>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>
  <ul>
  <li><code>i</code> becomes <code>!</code></li>
  <li><code>a</code> becomes <code>@</code></li>
  <li><code>m</code> becomes <code>M</code></li>
  <li><code>B</code> becomes <code>8</code></li>
  <li><code>o</code> becomes <code>.</code></li>
  </ul>
  </blockquote>
  <pre><code>word = input()
  
  password = ''
  
  if 'a' in x:
      password = word.replace('a', '@')
  if 'i' in x:
      password = word.replace('i', '!')
  if 'm' in x:
      password = word.replace('m', 'M')
  if 'B' in x:
      password = word.replace('B', '8')
  if 'o' in x:
      password = word.replace('o', '.')
          
  print(password)
  </code></pre>