title: global variable doesn't change?
body: <p>it doesn't matter what the input is, the output is always 0, like the global variables NEVER change. please help me I'm going crazy because i don't see any reason for this to show only 0</p>
  
  <pre><code>x=0
  y=0
  import math
  import operator
  
  
  def move(steps,op_func,z):
      if z == "x":
          global x
          x = op_func(x, int(steps))
      else:
          global y
          y = op_func(y, int(steps))
  
  def main():
  
      user_direct=raw_input("Enter the way that you want the plane to move and how many steps you want it to move\n")
      while user_direct != " ":
  
          steps=user_direct[-1]
          direction=user_direct[:-1]
          directions = {"UP":move(steps,operator.add,"x"),
                        "DOWN":move(steps,operator.sub,"x"),
                        "RIGHT":move(steps,operator.add,"y"),
                        "LEFT":move(steps,operator.sub,"y")}
  
          directions[direction.replace(" ","")]
  
          user_direct=raw_input("Enter the way that you want the plane to move and how many steps you want it to move\n")
  
          global x
          global y
          distance=math.sqrt(x**2+y**2)
          print distance
  main()
  </code></pre>