title: Nameerror: name 'h' is not defined
body: <p>So I am trying to write a small script in python that will differentiate inputs, and when the appropriate input is given, an <code>int</code>, it will give the correlating answer. I know there are a number of posts on this topic that are similar but I was having trouble finding my answer. Here is what I have. </p>
  
  <pre><code>oktas = input("Oktas: ")
  
  def sky_condition(oktas):
     if isinstance(oktas, int) == True:
        if oktas == 0:
           print ("CLR")
        elif oktas == 1 or oktas == 2:
           print ("FEW")
        elif oktas == 3 or oktas == 4:
           print ("SCT")
        elif oktas &gt;= 5 and oktas &lt;= 7:
           print ("BKN")
        elif oktas == 8:
           print ("OVC")
        elif oktas &lt; 0 or oktas &gt; 8:
           raise ValueError("Oktas provided are above or below the allowed limits.")
     elif isinstance(oktas, int) == False:
        raise NameError("You suck at following instructions.")
  
  skycondition(oktas)
  </code></pre>
  
  <p>When you put in an <code>int</code> or a <code>str</code>(as in something in "quotation marks") then it processes everything as it should. However if I just put a letter or word without quotation marks, for example h, it raises the error </p>
  
  <pre><code>NameError: name 'h' is not defined 
  </code></pre>
  
  <p>It produces the error I want but not how I wanted it. How can I code it so it will raise the error how I want it?</p>