title: Error "unsupported operand type(s) for -: 'str' and 'float'?
body: <p>This code works perfectly to find the average of the numbers in the file it references however I cannot seem to get it to find the standard deviation.
  The equation for standard deviation is: Square root/(n1-a)^2+(n2-a)^2/m</p>
  
  <p>-everything is under the square root i could not find the character for it</p>
  
  <p>-N1,N2.....Nm=the numbers that are in the list being referenced</p>
  
  <p>-a=average</p>
  
  <p>-m=total number of numbers in the list</p>
  
  <p>here's what I have,</p>
  
  <pre><code>def main():
      numbersFile=open("RandomNumber.txt" , 'r')
  
      line=numbersFile.readline()
      total=0
      numberoflines=0
  
      while line != "":
          numberoflines+=1
          total+=int(line)
          line=numbersFile.readline().strip()
      average=total/numberoflines
      std=line-average
      deviation=(std**2)/numberoflines
  
  
      print("The average is: " , average)
      print("The standard deviation of the numbers is: " , deviation)
  
  
  main()        
  </code></pre>