title: How do I make a password program in Python 3.4?
body: <p>I am currently username and password was equivalent to one found in the code. This is what I have so far:</p>
  
  <pre><code>import os
  
  #Must Access this to continue.
  def main():
      while True:
          UserName = input ("Enter Username: ")
          PassWord = input ("Enter Password: ")
  
          if UserName == Bob and PassWord == rainbow123:
              time.sleep(1)
              print ("Login successful!")
              logged()
  
          else:
          print ("Password did not match!")
  
  def logged():
      time.sleep(1)
      print ("Welcome to ----")
  
  main()
  </code></pre>
  
  <p>After I run the code, I receive this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\Austin\Desktop\oysterDev\oysterDev.py", line 23, in &lt;module&gt;
      main()
    File "C:\Users\Austin\Desktop\oysterDev\oysterDev.py", line 11, in main
      if UserName == Bob and PassWord == rainbow123:
  NameError: name 'Bob' is not defined
  </code></pre>
  
  <p>Does anyone know what I am doing wrong? Or where I could find some code that works like this for Python 3.4? Thanks!</p>