Title: If statement
Type: performance Stage: resolved
Components: IDLE Versions: Python 3.2
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: brian.curtin, smb30
Priority: normal Keywords:

Created on 2011-06-07 21:08 by smb30, last changed 2011-06-07 21:13 by brian.curtin. This issue is now closed.

Messages (2)
msg137883 - (view) Author: Matthew Brunt (smb30) Date: 2011-06-07 21:08
i'm very new to python (currently going through a python for beginners book at work to pass the time), and i'm having trouble with an if statement exercise.  basically, i'm creating a very simple password program that displays "Access Granted" if the if statement is true.  the problem i'm having is that no matter what i set the password to, it seems like it's ignoring the if statement.  the code is copied below, and i greatly appreciate any input.

# Granted or Denied
# Demonstrates an else clause

print("Welcome to System Security Inc.")
print("-- where security is our middle name\n")

password = input("Enter your password: ")

if password == "a":
    print("Access Granted")

input("\n\nPress the enter key to exit.")
msg137884 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2011-06-07 21:13
You might want to check out the python-tutor or python-list email lists (see This is a tracker for bug reports or problems with the Python interpreter and standard libraries.
Date User Action Args
2011-06-07 21:13:23brian.curtinsetstatus: open -> closed

nosy: + brian.curtin
messages: + msg137884

resolution: rejected
stage: resolved
2011-06-07 21:08:52smb30create