title: 'expected a character, but string of length # found' Encryption Program not working
body: <p>My code:</p>
  
  <pre><code>def Encryption(text):
     for I in text:
        string = ""
        ASCII = ord(text)
        Result = ASCII + Offset
        if Result &gt; 126:
           Result -= 94
        else:
           Result = Result
        ResultASCII = chr(Result)
        string += ResultASCII
  </code></pre>
  
  <p>For my first piece of GCSE coursework, we had to make an encryption program. The final part that we have to make is the part that actually encrypts your message. I've used this code, however it comes up with an error of:</p>
  
  <pre><code>TypeError: ord() expected a character, but string of length # found
  </code></pre>
  
  <p>How do I get it to detect a string instead of just a character?</p>