title: How to fix "undefined name" error message in Python?
body: <p>I am creating a simple calculator with Python as my first "bigger" project.
  I am trying to use def function and when i am trying to call that function it gives "undefined name" error message.</p>
  
  <pre class="lang-py prettyprint-override"><code>while True:
      print ("Options: ")
      print ("Enter '+' to add two numbers")
      print ("Enter '-' to subtract two numbers")
      print ("Enter '*' to multiply two numbers")
      print ("Enter '/' to divide two numbers")
      print ("Enter 'quit' to end the program")
      user_input = input(": ")
  
      def calculation (argnum1, argnum2):
          argnum1 = float (input("Enter your fist number: "))
          argnum2 = float (input("Enter your second number: "))
          number = argnum1
          number = argnum2
          result = argnum1 + argnum2
          print (result)
          print("-"*25)
          return number
          return result
  
      if user_input == "quit":
          break
  
      elif user_input == "+":
          calculation (argnum1, argnum2)
  
  I expect the output of argnum1 + argnum 2 result.
  </code></pre>