title: Syntax errror message, on python idle
body: <p>It say's there's a syntax error on my code, here is the new chunk I had added recently which must have an error somewhere. I am new to python, any help is much appreciated. Perhaps something with the indentation but I can't see where and it doesn't specify a line :(</p>
  
  <pre><code>def store_results(class_number, name, score):
     class_number = str(class_number) + ".txt" #this adds '.txt' to the end of the file (therefore creating a text file) so it can be used to create a file under the name of the class
     file = open(class_number, 'a') #opens the file in 'append' mode so you don't delete all the information
     #file.write(str(students_names))
     file.write(str(name + " : ")) #writes the name and ":" to file
     file.write(str(score)) #writes the score to file
     file.write('\n')#writes the score to the file
     file.close()#safely closes the file to save the information
  
  def store_results(class_number, name, score):
     class_file = "{}.txt".format(class_number)  # this adds '.txt' to the end of the file (therefore creating a text file) so it can be used to create a file under the name of the class
     with open(class_file, 'a') as f: # opens the file in 'append' mode so you don't delete all the information
        f.write("{}: {}\n".format(name, score)
  
  def store_results(class_number, name, score): # this adds '.json' to the end of the file (therefore creating a json file)
     class_file = "{}.json".format(class_number) # first step: load the existing data
     if not os.path.exists(class_file):
        scores = {}
     else:
         with open(class_file, 'r') as f:
        scores = json.load(f)
        scores.setdefault(name, []).append(score)
        with open(class_file, 'w') as f:
        json.dump(scores, f) 
  </code></pre>
  
  <p>The error message just says: </p>
  
  <pre><code>**SYNTAX ERROR: INVALID SYNTAX**
  </code></pre>
  
  <p>However the cursor jumps back to this line</p>
  
  <pre><code>def store_results(class_number, name, score): 
  </code></pre>