[Tutor] Help me please
kent37 at tds.net
Wed Mar 15 11:55:29 CET 2006
yogeshwarran Nadeson wrote:
> I am a newbie in python programming without previous programming
> experience.Here i would like to ask
> a question based on the exercises given by Josh Cogliatti in his
> tutorial.I'll paste the question.Hope you can help me to solve it.I'd
> like to end it by saying thanks for all yourr help.
Have you written a program that uses loops? Could you write a program
that uses a loop to print "Hello" three times?
> *:Modify the password guessing program to keep track of how many times
> the user has entered the password wrong. If it is more than 3 times,
> print ``That must have been complicated.'' *
> This is the previous password program:
> # Waits until a password has been entered. Use control-C to break out with out
> # the password
> #Note that this must not be the password so that the
> # while loop runs at least once.
> password = "foobar"
> #note that != means not equal
> while password != "unicorn":
> password = raw_input("Password:")
> print "Welcome in"
More information about the Tutor