title: Can't convert 'int' object to str implicitly
body: <p>This is a maths quiz consisting of random questions. At the end of the quiz a score is displayed, and then I try to put the result and name of student in a file and an error message pops up:</p>
  
  <pre><code>import random
  import time
  
  counter = 0
  
  #I think the problem is around here?
  score = int("0")
  count = 0
  
  function = ['+', 'x', '-']
  
  # Introducing quiz
  print('Welcome To The Arithmetic Quiz!')
  time.sleep(2)
  
  name = input('Please enter you name. ')
  time.sleep(1)
  
  print('Thanks', name, '. Let\'s Get Started!')
  time.sleep(1)
  
  while counter &lt; 10:
  questions.
      firstnumber = random.randint(0, 12)
      secondnumber = random.randint(0, 6)
      operator = random.choice(function)
  
      question = print(firstnumber, operator, secondnumber, '=')
  
      userAnswer = input('Answer:')
  
      if operator == '+':
          count = firstnumber + secondnumber
          if count == int(userAnswer):
              print('Correct!')
              score = score+1
          else:
              print('Incorrect')
      elif operator== 'x':
          count = firstnumber*secondnumber
          if count == int (userAnswer):
              print('Correct!')
              score = score+1
          else:
              print('Incorrect')
      elif operator== '-':
          count = firstnumber - secondnumber
          if count == int(userAnswer):
              print('Correct!')
              score = score + 1
          else:
              print('Incorrect')
      counter += 1
  
      print("Your quiz is over!")
      print("You scored", score, "/10")
      what_class = input("Please enter your class number: ")
      classe = open("what_class.txt", "wt")
      type(classe)
      classe.write(name + score)
      classe.close()
  </code></pre>
  
  <p>Then this error message comes up:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/4/gcse maths.py", line 61, in &lt;module&gt;
      classe.write(name+score)
  TypeError: Can't convert 'int' object to str implicitly
  </code></pre>