This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: If statement
Type: performance Stage: resolved
Components: IDLE Versions: Python 3.2
process
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 2022-04-11 14:57 by admin. 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 http://mail.python.org/mailman/listinfo). This is a tracker for bug reports or problems with the Python interpreter and standard libraries.
History
Date User Action Args
2022-04-11 14:57:18adminsetgithub: 56489
2011-06-07 21:13:23brian.curtinsetstatus: open -> closed

nosy: + brian.curtin
messages: + msg137884

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