[Tutor] (no subject)

akira sugiura kodokuchef@yahoo.com
Tue, 13 Aug 2002 19:10:48 -0700 (PDT)


Thank you Alan,
=======================================================
password = "foobar"
 a=0
 
 while password != "unicorn":
     print "You've guessed",a,"times."
     password = raw_input("Password?:")
      a=a+1

  if password=="unicorn":
      print "Welcome in, you took ", a, "attempts."

  #I added
  if a>3:
      print "That must've been complicated"
=======================================================
So, this "while loop" ends only when I enter
unicorn.(right?)
How can I make it ends either when I enter "unicorn"
(right password) or wrong password more than three
times?
Probably I will learn it after I advanced more
practices not now.

Thanks anyway. I am enjoying learning python.(I guess)
   

=====
-----------------------------------
Akira Sugiura
kodokuchef@yahoo.com
-----------------------------------

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com