title: How to change case for alternative letters of a string
body: <p>I would like to convert every other letter of a string into uppercase. For example provided the input is <code>'ahdjeryu'</code>, the result should be <code>'AhDjErYu'</code>.</p>
  
  <p><strong>I was trying this:</strong></p>
  
  <pre><code>def mycode(letters):
      myword = letters.split()
      for i in letters:
          if i%2 == 0:
              return i.upper()
          else:
              return i.lower()
  print(mycode('ahdjeryu'))
  </code></pre>
  
  <p>The error thrown as: 
      <code>if i%2==0:</code></p>
  
  <blockquote>
    <p>TypeError: not all arguments converted during string formatting</p>
  </blockquote>