title: Error: unsupported operand type(s) for /: 'NoneType' and 'int'
body: <p>I've seen several questions like this one but none of them solve my issue in the correct way. Meaning the way that it is answered is either not working or makes no sense to me. I'll give you the code thats giving me fits and the error it's giving.</p>
  
  <pre><code>Error: unsupported operand type(s) for /: 'NoneType' and 'int'
  </code></pre>
  
  <p>Is the error and the code is:</p>
  
  <pre><code>#Define iteration#
  iteration=0;
  iterationNum=0;
  
  #Define encryption#
  def encrypt(num,iteration):
      num=cos(num/(iteration+1));
  
  def runEncrypt(array,iterationNum):
      for j in range(iterationNum):
          for i in range (len(array)):
              array[i]=encrypt(array[i],j);
  
  #Internal test area#
  array1=[1,2,3,4,5];
  encryptedArray=runEncrypt(array1,4);
  print(encryptedArray);
  </code></pre>