Loop Question
Dave Angel
davea at davea.name
Mon Jun 24 15:23:51 EDT 2013
On 06/24/2013 03:00 PM, John Gordon wrote:
> In <mailman.3754.1372100014.3114.python-list at python.org> =?UTF-8?B?Q2hyaXMg4oCcS3dwb2xza2HigJ0gV2Fycmljaw==?= <kwpolska at gmail.com> writes:
>
>>> while True:
>>> username = raw_input("Please enter your username: ")
>>> password = raw_input("Please enter your password: ")
>>>
>>> if username == "john doe" and password == "fopwpo":
>>> print "Login Successful"
>>> break
>>>
>>> else:
>>> print "Please try again"
>
>> You didn't test the code, did you? Because the code you posted is
>> right.
>
> It's right, therefore I did not test it? I don't understand.
I expect that Chris simply misinterpreted the quoting in your message,
thinking that the OP had both typed the
"Can't seem to get this to cooperate...where does t..."
and the correct code. In fact, the OP typed the former, and you typed
the latter.
--
DaveA
More information about the Python-list
mailing list