title: Global Variable warning from warnings module
body: <p>Whenever I try to change a variable in Python to global, I get an error message before the code actually runs. The code still runs fine despite these error messages. This is one that I've got:</p>
  
  <pre><code>Warning (from warnings module):
    File "N:\Documents\Computer Science\Sample CAB 2\Estimate\Task 2 Estimate.py", line 202
      global loop
  SyntaxWarning: name 'loop' is assigned to before global declaration
  </code></pre>
  
  <p>Can anyone help?</p>