title: Switcher not going to functions
body: <p>I'm not sure why I keep getting an error for the &quot;print func()&quot; part, saying it's an invalid syntax. I'm trying to have the switcher go to a definition for each value it receives. The code runs the loop properly it's just the switcher part I'm having trouble with.</p>
  <pre><code>import numpy as np
  
  i = 0
  
  # get the order the balloons need to be popped in
  # just put the number
  yellow = input (&quot;When does yellow get popped &quot;)
  red = input (&quot;When does red get popped &quot;)
  blue = input (&quot;When does blue get popped &quot;)
  green = input(&quot;When does green get popped &quot;)
  
  print(&quot;&quot;)
  
  # put them in an array for the switcher function
  
  order = [yellow, red, blue, green]
  
  
  # a while loop that will go through the switcher until
  # all ballons have been popped
  while i &lt; 4:
  
      def yellow_turn():
          return &quot;pop yellow next&quot;
   
      def red_turn():
          return &quot;pop red next&quot;
   
      def blue_turn():
          return &quot;pop blue next&quot;
   
      def green_turn():
          return &quot;pop green next&quot;
  
      next_ball = order[i]
      print(next_ball)
  
      def ballon_order(next_ball):
          switcher = {
          0: yellow_turn,
          1: red_turn,
          2: blue_turn,
          3: green_turn,
          }
          func = switcher.get(next_ball, lambda: &quot;Invalid input&quot;)
          print func()
      i += 1
  </code></pre>