title: Why does my program run without parameters inside the functions' parenthesis?
body: <p>I am going to ask probably a very silly question. I designed a code that looks like the following:</p>
  <pre><code>import pandas as pd 
  import seaborn as sns
  import matplotlib.pyplot as plt
  
  def menu():
     print(&quot;[1]: Favorite color&quot;) 
     print(&quot;[2]: Number of cats&quot;)
  
  #Option1
  def FavColor():
     sns.countplot(x= &quot;Color&quot;, data = main_data)
     plt.show()
  
  #Option2
  def NumCats():
     sns.countplot(x= &quot;Cats&quot;, data = main_data)
     plt.show()
  
  #Main Code
  
  try:
     main_data = pd.read_csv(&quot;DATAFIN.csv&quot;)
  except IOError:
     print(&quot;Error while trying to open the file&quot;)
  else:
     menu()
     option = int(raw_input())
     if option == 1:
           FavColor()
     elif option == 2:
           NumCats()
  </code></pre>
  <p>main_data looks like this:</p>
  <pre><code>    Color   Cats
  1    Blue      1
  2    Yellow    2
  3    Blue      2
  4    Red       1
  5    Blue      3
  </code></pre>
  <p>Now, the &quot;problem&quot; is that my program runs exactly as it should. I just realized, however, that all of my functions, options(), Option1() and Option2(), do not have parameters inside the parenthesis. This is due to me forgetting to do so, but my understanding was that my functions should not work without me giving them the parameters that needed to be used.</p>
  <p>For example, if Option1 had to use a precise dataframe I should have written Option1(dataframe).</p>
  <p>Everything that my functions need to you is defined in the main code, which you go through before calling the functions, so maybe that's the reason. But is it wrong not to put the parameters inside? Does it make my program less efficient?</p>