title: Function with input vs Function without input - Python
body: <p>This may seem like a basic question but it has me confused.  The following 2 examples work in a similar way I believe (assuming input is the same) It prompts the user for a number, multiplies that number by 5 and returns the answer.</p>
  
  <p>My question is, why and when would you ever choose the second example over the first? (and vice versa).  In more general terms, why have functions with arguments as opposed to having the arguments given within the function.  If that makes sense.  If this is a bad example I apologize, I am just trying to wrap my head around this.</p>
  
  <p>Thanks</p>
  
  <p>No arguments:</p>
  
  <pre><code>def func():
      x = int(input('Enter a number:'))
      y = x * 5
      print(y)
  
  func()
  </code></pre>
  
  <p>One argument:</p>
  
  <pre><code>def func_2(y):
      x = int(input('Enter a number:'))
      y = x * 5
      return y
  
  print(func_2(6))
  </code></pre>