<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="adobe-courier-iso10646-1">hi there,<br>
<br>
i am new to python and programming so here it i am asking:<br>
<br>
i am doing one exercise in a tuturial but could not make what iam
trying to achieve,<br>
what i am doing is a script that asks for a password for three tries,
when you hit wrong password three times it will terminate the script
but when you hit the right pass word it will say "Welcome."<br>
<br>
and here is the code:<br>
<br>
passwd = 0<br>
print "Please enter your password."<br>
password = ""<br>
while passwd != 3 :<br>
    <br>
    <br>
    if password != "pogingbakla" :<br>
        password = raw_input("Password:")<br>
        passwd = passwd + 1<br>
        if passwd < 3 :<br>
            print "Wrong try again."<br>
<br>
        else:<br>
            print "You have entered wrong password three times, try
again later." <br>
        <br>
    else:<br>
        print "Welcome."<br>
<br>
my problem is when i execute the script and typed the right password
the it loops forever the "Welcome." greeting.<br>
i could not terminate the program once i entered the right password.<br>
<br>
what am i doing wrong here? i know i am missing something.<br>
<br>
thanx again.<br>
</font>
<div class="moz-signature">-- <br>
<!-- ================================================================================  -->
<!-- This HTML file was created by AbiWord.                                            --><!-- AbiWord is a free, Open Source word processor.                                    -->
<!-- You may obtain more information about AbiWord at www.abisource.com                --><!-- ================================================================================  -->
<meta http-equiv="content-type" content="text/html; ">
<title>/home/oliverm/GNUstep/signature2.htm</title>
<style type="text/css">
body
{
        font-family: "Nimbus Roman";
        font-style: normal;
        text-indent: 0in;
        font-weight: normal;
        font-variant: normal;
        color: #000000;
        text-decoration: none;
        text-align: left;
        font-size: 12pt;
        widows: 2;
        font-stretch: normal;
        background-color: #ffffff;
}

@media print
{
        body
        {
                padding-top: 1.0000in; padding-bottom: 1.0000in;
                padding-left: 1.0000in; padding-right: 1.0000in;
        }
}

p, .Normal
{
        font-family: "Nimbus Roman";
        font-style: normal;
        margin-left: 0pt;
        text-indent: 0in;
        margin-top: 0pt;
        font-weight: normal;
        font-variant: normal;
        color: #000000;
        text-decoration: none;
        margin-bottom: 0pt;
        text-align: left;
        margin-right: 0pt;
        font-size:12pt;
        widows: 2;
        font-stretch: normal;
}

</style>
<div>
<p style="text-align: center;"><br>
</p>
<p style="text-align: center;"><span style="font-size: 16pt;">______________________________________________________</span></p>
<p style="text-align: center;"><br>
</p>
<p style="text-align: center;"><span
 style="font-weight: bold; font-style: italic; color: rgb(0, 0, 0); font-size: 12pt;">The
great thing in this world is not so much where we are</span></p>
<p style="text-align: center;"><span
 style="font-weight: bold; font-style: italic; color: rgb(0, 0, 0); font-size: 12pt;">but
in what direction we are moving.</span></p>
<p style="text-align: center;"><span
 style="font-weight: bold; font-style: italic; color: rgb(0, 0, 0); font-size: 16pt;">_______________________________________________________</span></p>
<p style="text-align: center;"><br>
</p>
<p style="text-align: center;"><br>
</p>
</div>
</div>
</body>
</html>