title: NameError in Pycharm?
body: <p>I wrote this code in Pycharm and I got the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;input&gt;", line 1, in &lt;module&gt;
  NameError: name 'crypte' is not defined
  </code></pre>
  
  <p>__
  My code:</p>
  
  <pre><code>alphaclair = "abcdefghijklmnopqrstuvwxyz"
  alphadecale = "defghijklmnopqrstuvwxyzabc"
  
  def modif(lettre):
      for i in range(0, len(alphaclair)):
          if alphaclair[i]==lettre:
              return alphadecale[i]
  
  def crypte(phrase):
      string = ""
      for i in range(0, len(phrase)):
          if phrase[i]==" ":
              string = string + " "
          else:
              string = string + modif(phrase[i])
      return string
  </code></pre>
  
  <p>When I do <code>run</code>and then I execute it in the Python console I get that error.</p>
  
  <p>When I select the code and I right click and do <code>Execute Selection in Console</code> I do not get the error.</p>
  
  <p>What is my mistake?</p>