title: How can I run a script after importing it?
body: <p><strong>Problem</strong></p>
  <p>I would like to import a script containing many functions and then run them, so that I can use the function. I may have misunderstood the purpose of import. I am working in Jupyter.</p>
  <p><strong>Reprex</strong></p>
  <pre><code>#Create the script in a local folder
  
  %%writefile test.py
  c = 500
  
  def addup(a,b,c):
      return a*b + (c)
  
  </code></pre>
  <pre><code>#import the file and use it
  
  import test
  addup(1,5,c)
  
  
  #Error message
  
  ---------------------------------------------------------------------------
  # NameError                                 Traceback (most recent call last)
  # &lt;ipython-input-1-71cb0c70c39d&gt; in &lt;module&gt;
  #       1 import test
  # ----&gt; 2 addup(1,5,c)
  
  # NameError: name 'addup' is not defined
  
  </code></pre>
  <p><strong>Any help appreciated.</strong></p>