Message137883
| Author |
smb30 |
| Recipients |
smb30 |
| Date |
2011年06月07日.21:08:52 |
| SpamBayes Score |
3.3641282e-07 |
| Marked as misclassified |
No |
| Message-id |
<1307480932.85.0.0272604438661.issue12280@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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.") |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年06月07日 21:08:52 | smb30 | set | recipients:
+ smb30 |
| 2011年06月07日 21:08:52 | smb30 | set | messageid: <1307480932.85.0.0272604438661.issue12280@psf.upfronthosting.co.za> |
| 2011年06月07日 21:08:52 | smb30 | link | issue12280 messages |
| 2011年06月07日 21:08:52 | smb30 | create |
|