title: run python code in vi editor and passing user input
body: <p>I want to run the following code in vi editor:</p>
  
  <pre><code>def factorial( n ):
     if n &lt;1:   # base case
         return 1
     else:
         returnNumber = n * factorial( n - 1 )  # recursive call
         print(str(n) + '! = ' + str(returnNumber))
         return returnNumber
  </code></pre>
  
  <p>I want to give a runtime input for the value n while running the program in vi editor. I don't know how to give run time user input for a python program in vi editor. Also wants to know what changes need to be done in the code while running the code in vi editor. Can I have a resolution for this? I am able to run the code but unable to pass the value of n. </p>
  
  <p>I am running this in Putty and I am using Python3.</p>