On Wed, Jul 1, 2009 at 3:53 AM, Daniel Sato<sato.ph...@gmail.com> wrote:
> I have been going through some Python Programming exercises while following
> the MIT OpenCourseWare Intro to CS syllabus and am having some trouble with
> the first "If" exercise listed on this page:
>
> http://en.wikibooks.org/wiki/Python_Programming/Conditional_Statements#If_Exercises
>
> I have been able to make the module quit after entering a password three
> times, but can't get it to quit right away after the correct one is
> entered.  I know this is really basic, please forgive me.  I have no
> programming experience and have just started going through these tutorials.

You need a 'break' statement to terminate the loop once the condition
has been met.

http://www.swaroopch.com/notes/Python_en:Control_Flow#The_break_Statement

Craig
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to