title: Whats is going on? Python skipping over lines in function
body: <p>When I run the following program in Python, the function takes the variables in, but completely skips over the rest and re-shows the main menu for the program without doing anything. Plus, it skips the qualifying "if" statements and asks for all the variables even if the first or second options are chosen (which don't need the third variable). BTW, It shouldn't be an indent error, I just indented to show it was code inside stackoverflow.</p>
  
  <p>EDIT: NEVERMIND. I got it to work. The variables in the function parenthesis all have to be the same. DUH! <em>smacks forehead</em></p>
  
  <pre><code>option = 1
  while option !=0:
      print "\n\n\n************MENU************"
      print "1. Counting"
      print "2. Fibbonacci Sequence"
      print "0. GET ME OUTTA HERE!"
      print "*" * 28
      option = input("Please make a selection: ") #counting submenu
      if option == 1:
  
          print "\n\n*******Counting Submenu*******"
          print "1. Count up by one"
          print "2. Count down by one"
          print "3. Count up by different number"
          print "4. Count down by different number"
          print "*" * 28
          countingSubmenu = input("Please make a selection: ")
          x=0
          y=0
          z=0
          q=0
          def counting (x, y, z, countingSubmenu, q):
              x = input("Please choose your starting number: ")
              y = input("Please choose your ending number: ")
              if countingSubmenu == 1:
                  for q in range (x, y+1, 1):
                      print q
              elif countingSubmenu == 2:
                  for q in range (x, y, -1):
                      print q
              elif countingSubmenu == 3:
                  z = input("Please choose an increment: ")
                  for q in range (x, y+1, z):
                      print q
              else:
                  z = input("Please choose an increment: ")
                  for q in range (x, y, -z):
                      print q
              return x, y, z, q
          if countingSubmenu == 1:
              counting(countingSubmenu, x, y, z, q)
          if countingSubmenu == 2:
              counting(countingSubmenu, x, y, z, q)
          if countingSubmenu == 3:
              counting(countingSubmenu, x, y, z, q)
          if countingSubmenu == 4:
              counting(countingSubmenu, x, y, z, q)
  </code></pre>