[Tutor] (no subject)

alan.gauld@bt.com alan.gauld@bt.com
Mon, 12 Aug 2002 18:24:25 +0100


> I am completly new to either python or a world of
> programing. Honestly I am a bit nervous using this
> service first time. 

That's OK we are here to help...

Now lets break down your question:
> ======================================================
> Modify this program to keep track of how many times
> the user has entered the password wrong. 

The first bit just wants you to count the number 
of wrong guesses. So we need some kind of variable 
(lets call it counter?)

We need to set counter to zero to start with.
Each time round the loop add one to counter.

At the end of the loop print out the value of counter.

Why not try that bit first. We can come back to the 
second part below after you get this working.

Even if you don;t get it working completely post 
your attempt here so we can see how you are 
approaching it. That often helps uys explain 
the issues better. We won't laugh, I promise! :-)

Alan g.
Author of the 'Learning to Program' web site
http://www.freenetpages.co.uk/hp/alan.gauld