Python Newbie

Jorge Godoy godoy at ieee.org
Fri May 21 18:40:15 EDT 2004


On Sex 21 Mai 2004 19:34, Brian wrote:

> #Limiting password atempts to three
> 
> password = raw_input("Enter your Password: ")
> count = 0
> 
> 
> while password != "secret":
>      print password = raw-input("Enter your Password: ")
>      count += 1
> 
> if password == "secret":
>      print "Welcome in."
>      
> 
> elif count > 3:
>      print "Please come back when you remember your Password."
> 
> else:
>      raw_input("Press enter to exit.")
> 
> Ok, I know I may be way off course here but any help would be greatly
> appreciated.  I dont want to get frustrated and say the heck with it,
> especially if it is something minor.  Thanks in advance.

I won't end your fun giving you the answer, but remember that in Python
indentation matters, i.e., your lines alignment matters.

Read the program above and remember that when you go further on indentation,
you just come back when the block is ended.


Got it?

-- 
Godoy.      <godoy at ieee.org>



More information about the Python-list mailing list