title: JES: Implementing modification code to a Loop
body: <p>I am using JES and am wondering what built in function I should use to make this effect work.</p>
  
  <pre><code>newG=(oldG+(abs(x*y*2.57901)%64))%256
  </code></pre>
  
  <p>So far I have this code</p>
  
  <pre><code>def forLoop():
    picture = makeEmptyPicture(300,200)
    show(picture)
  
    for p in getPixels(picture):
      setColor(p,black)
  
   repaint(picture)
  
    for p in getPixels(picture):
     oldG=(p)
     newG=(oldG+(abs(x*y*2.57901)%64))%256 
   repaint(picture)
  </code></pre>
  
  <p>The error I get is  </p>
  
  <pre><code>The error was:x Name not found globally.
  </code></pre>
  
  <p>A local or global name could not be found. You need to define the function or variable before you try to use it in any way.</p>