[Tutor] password loop

ADRIAN KELLY kellyadrian at hotmail.com
Sat Sep 24 00:56:46 CEST 2011


Can anyone help me with the programme below; i hope you can see what i am trying to do, if i enter the wrong password the loop goes on forever and if i enter the right one nothing is printed...
i am a newbie............all comments welcome
 
thanks adrian................
 
print 'hello'
print 'i am your computer'
 
# set the values
password='route9999'
Enter_Password=raw_input ('please enter your password: ')
 
#password loop
while Enter_Password != password:
    if Enter_Password !=password:
        print 'try again'
    else:
        print 'well done'
        
    
  		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110923/5b769662/attachment.html>


More information about the Tutor mailing list