title: input(): "NameError: name 'n' is not defined"
body: <p>Ok, so I'm writing a grade checking code in python and my code is:</p>
  
  <pre><code>unit3Done = str(input("Have you done your Unit 3 Controlled Assessment? (Type y or n): ")).lower()
  if unit3Done == "y":
      pass
  elif unit3Done == "n":
      print "Sorry. You must have done at least one unit to calculate what you need for an A*"
  else:
      print "Sorry. That's not a valid answer."
  </code></pre>
  
  <p>When I run it through my python compiler and I choose <code>"n"</code>, I get an error saying:</p>
  
  <blockquote>
    <p>"NameError: name 'n' is not defined"</p>
  </blockquote>
  
  <p>and when I choose <code>"y"</code> I get another <code>NameError</code> with <code>'y'</code> being the problem, but when I do something else, the code runs as normal.</p>
  
  <p>Any help is greatly appreciated,</p>
  
  <p>Thank you.</p>