title: Returning a variable isn't working in Python
body: <p>I have to do a Python NEA, but it doesn't count towards my GCSE grade for some reason, and every time the function repeats the variables <code>score1</code> and <code>score2</code> reset to <code>0</code>, when I want them to keep their values which is added to inside the procedure.</p>
  
  <p>Here's roughly what the code that doesn't work looks like (I'm not allowed to bring the code home but I am allowed to use the internet for help so this should be fine):</p>
  
  <pre><code>import random
  
  def roll(score1, score2):
      roll1 = random.randint(1,6)
      score1 += roll1
      roll2 = random.randint(1,6)
      score2 += roll2
      print(score1, score2)
      print('---')
      return score1, score2
  
  for __ in range(3):
      score1 = score2 = 0
      for __ in range(4):
           roll(score1, score2)
  </code></pre>