title: Program to crack Caesar cipher
body: <p>The Caesar cipher basically shifts each letter of plaintext by a fixed number.
  For example, if the key 2 is used, the word Sourpuss would be encoded Uqwrtrwuu</p>
  
  <p>The text can contain only the printable ASCII characters (32-126, for our purposes). Implement an algorithm for cracking this code.</p>
  
  <p>I need to decrypt this: "T! x$r&amp;'}r&amp;z! %21j!'1~zxy&amp;1"r%%1TZedBEAB?"</p>
  
  <p>Here is my code:</p>
  
  <pre><code>def decoded(s):
      for i in range(1,95):
          string = ""
          for char in s:
              if(ord(char) + i &gt; 126):
                  charc = (ord(char) + i) - 94
                  string =  string + chr(charc)
              else:
                 charc = ord(char) + i
                 string =  string + chr(charc) 
  
          print(string)
  decoded("T! x$r&amp;'}r&amp;z! %21j!'1~zxy&amp;1\"r%%1TZedBEAB?")
  </code></pre>
  
  <p>As you can see I added a <code>\</code> but I don't think that would change my answer?</p>
  
  <p>The problem is that it is not printing out a correct answer. Could someone please tell me what is wrong with my code or just point me in the right direction. </p>