title: How to run python function from command line
body: <p>This is my code:</p>
  <pre><code>def isPrime(n):
      if n&gt;1:
          for i in range(2, n):
              if (n%i)== 0:
                  print(n, &quot;is not a prime number&quot;)
                  print(i, &quot;*&quot;, n//i, &quot;=&quot;, n)
                  break
          else:
              print(n, &quot;is a prime number&quot;)
      else:
          print(n, &quot;is not a prime number&quot;)
  </code></pre>
  <p>Earlier I have used idle and Jupyter notebook but now I am trying to run it via command line and I don't know how to enter argument for the function defined. I'm using cmd for the first time for running scripts. This is what it shows:</p>
  <p><a href="https://i.stack.imgur.com/XCmER.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XCmER.png" alt="Command Prompt image" /></a></p>