title: shifting letters using ord and chr
body: <p>I am trying to do a function that shifts each letter in each word to the right by value
  and these words will be from a list that I will open it using "open"function 
  I wrote the code, and I am facing some difficulties here 
  here is my code </p>
  
  <pre><code>def test():
  value=eval(input("Value here!"))
  with open ("word-text.txt","r") as f:
      for ord in (f):
          print (ord)
          for chr in ord:
              print (chr)
              #nice=(chr[len(ord)+value])
          ''.join([chr(ord(i)+2) for i in s])
          print (i)
  </code></pre>
  
  <p>this is the output I get </p>
  
  <pre><code>Value here!2
  apples
  
  a
  p
  p
  l
  e
  s
  
  
  Traceback (most recent call last):
    File "&lt;pyshell#54&gt;", line 1, in &lt;module&gt;
      test()
    File "/Users/user/Desktop/Outlook(1)/lab6.py", line 59, in test
      ''.join([chr(ord(i)+2) for i in s])
  NameError: global name 's' is not defined
  </code></pre>
  
  <p>the list that I have the following words 
  apples
  oranges
  watermelon
  kiwi
  zucchini
  carrot
  okra
  jalapeno
  pepper
  cucumber
  banana
  and when I use this code </p>
  
  <pre><code>ef test():
  value=eval(input("Value here!"))
  with open ("word-text.txt","r") as f:
      for ord in (f):
          print (ord)
          for chr in ord:
              print (chr)
              nice=(chr[len(ord)+value])
              print (nice)
  </code></pre>
  
  <p>I get this output</p>
  
  <pre><code>Value here!2
  apples
  
  a
  Traceback (most recent call last):
    File "&lt;pyshell#56&gt;", line 1, in &lt;module&gt;
      test()
    File "/Users/user/Desktop/Outlook(1)/lab6.py", line 58, in test
      nice=(chr[len(ord)+value])
  IndexError: string index out of range
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>What am I doing wrong here? and which code is best to use, to get it working</p>
  
  <p>Thanks</p>