[Tutor] what is wrong with this syntax?
delegbede at dudupay.com
Tue May 18 18:39:50 CEST 2010
A LITTLE EXPLANATIONS ON CONTINUE WOULD BE APPRECIATED TOO.
in a recap, i would appreciate any brief explanation on
3. while loop
how they work and application in writing codes.
thank you all.
On 5/18/10, Dipo Elegbede <delegbede at dudupay.com> wrote:
> thanks Steven. I'll always be mindful of that.
> By the way, I need someone to briefly explain to me how the while loop
> a little on break will also do.
> On 5/18/10, Steven D'Aprano <steve at pearwood.info> wrote:
>> On Tue, 18 May 2010 11:36:02 pm Dipo Elegbede wrote:
>>> ples help me figure out what is wrong with this syntax?
>>> print('Here are the numbers from 0 to 9')
>>> for i in the range(10):
>>> thank you.
>> Others have already given you the answer, but more important is for you
>> to learn *how* to get the answer.
>> Look at the error message Python prints:
>>>>> for i in the range(10):
>> File "<stdin>", line 1
>> for i in the range(10):
>> SyntaxError: invalid syntax
>> You get a SyntaxError, which tells you that what you've written makes no
>> sense to the Python compiler. It also tells you that the error has
>> nothing to do with either of the print lines.
>> Unfortunately Python isn't smart enough to recognise that the problem is
>> with "the" rather than "range(10)", but it points you to the correct
>> Steven D'Aprano
>> Tutor maillist - Tutor at python.org
>> To unsubscribe or change subscription options:
> Elegbede Muhammed Oladipupo
> Mobile Banking Solutions | Transaction Processing | Enterprise
> Application Development
Elegbede Muhammed Oladipupo
Mobile Banking Solutions | Transaction Processing | Enterprise
More information about the Tutor