title: NameError: name is not defined when using it in if statement
body: <p>I'm creating a basic login that verifies if the password entered and the confirmation of that password match.</p>
  
  <pre><code>def login():  
    username = input("Please enter a username:")
    password = input("Please enter a password:")
    confirmPass = input("Please confirm your password:")
  
  login()
  
  if password == confirmPass:
    print("You have signed up")
  </code></pre>
  
  <p>I get the error that name password is not defined.</p>