title: list index is out of range - cannot find why
body: <p>I'm writing code to sort data into lists and then arrange these lists, but I keep getting:</p>
  
  <blockquote>
    <p>builtins.IndexError: list index out of range</p>
  </blockquote>
  
  <p>The data in the code is:</p>
  
  <pre class="lang-none prettyprint-override"><code>Class 1: 
  Matthew 5   5   1
  Paul    9   3   6
  Sara    9   4   2
  Nicholas3   2   4
  Larry   5   2   5
  Philip  4   4   6
  Patricia7   7   7
  Gary    0   9   4
  Marie   8   7   1
  Scott   4   3   2
  
  Class 2: 
  Heather 10  2   3
  Lawrence 2  4   4
  Stephen 1   6   8
  Robert  3   5   4
  Shawn   9   6   6
  Michelle 6  7   4
  Chris   10  4   2
  Teresa  5   5   6
  Dennis  7   8   1
  Rose    8   3   4
  
  Class 3:
  Jojo    10  3   9
  Sarah   1   2   8
  Jerry   5   3   7
  Aaron   7   8   5
  Carl    3   7   5
  Christine   9   4   4
  Jennifer    2   8   2
  Linda   8   8   1
  Justin  4   6   3
  Emily   2   4   7
  </code></pre>
  
  <p>The code:</p>
  
  <pre><code>import csv
  
  while True:
      ClassNumber = int(input("What class would you like to see the results for?"))
      if 1&lt;= ClassNumber &lt;=3:
          break
      print("That class does not exist. Please choose from 1,2 or 3")
  
  if ClassNumber == 1:
      ClassFile = "class1scores.csv"
  elif ClassNumber == 2:
      ClassFile = "class2scores.csv"
  else:
      ClassFile = "class3scores.csv"
  
  OpenFile = open(ClassFile, "r")
  scores = csv.reader(OpenFile)    
  
  newlist = []
  
  for row in scores:
      row[1] = int(row[1])
      row[2] = int(row[2])
      row[3] = int(row[3]) 
  
      HighestScore = max(row[0:3])
      row.append(HighestScore)
  
      AverageScore = round(sum(row[0:3])/3)
      row.append(AverageScore)
  </code></pre>