title: How to fix when Python says: UnboundLocalError: local variable 'money' referenced before assignment
body: <p>I am having troubles with my money variable. Each time I save and run, a ERROR pops up and I try to fix the problem but can't figure out how? I really need a reply so please soon. This is my project:</p>
  
  <pre><code>   money = 0.0
  Chop = 0
  spike = 0
  name = input("What is your name?")
  greeting = 'Hello ' + name + ','
  
  def Command():
      Command = input('Press \"C\" to continue or Press \"E\" to exit --&gt;')
  
  if name == 'SpikeTheKing':
  print('Welcome Spike,')
  spike = 1
  elif name == 'Spike':
  spike = 1
  print ('Welcome Spike,')
  else:
  print(greeting)
  def draw_line():
  print ('----------------')
  
  
  def Work1():
  Chop = input('Type anything to earn $1 --&gt;')
  while Chop == ('C') or ('c'):
      print ('$1 earned')
      money = money+1
      displayMoney()
      Chop = 0
      Command()
  def displayMoney():
  draw_line()
  print(('Money = '),('$'),(money))
  draw_line()
  displayMoney()
  Work1()
   if Command == ('C'):
   Work1()
   if Command == ('E'):
   quit()
  </code></pre>
  
  <p>Each time I save and run this happens:</p>
  
  <pre><code>Traceback (most recent call last):
  File "C:\Users\Leora\Desktop\Python Files\Python.py", line 35, in &lt;module&gt;
  Work1()
  File "C:\Users\Leora\Desktop\Python Files\Python.py", line 26, in Work1
  money = money+1
  UnboundLocalError: local variable 'money' referenced before assignment
  </code></pre>
  
  <p>What should I change?</p>