Hi: I am trying to teach myself Python, and am stuck at the indentation with
the elif statement.
This is what I am trying to type (as copied from the textbook):
x=3
if x==0:
print "x is 0"
elif x&1 ==1:
print "x is a odd number"
elif x&1==0: -- Line 6
print "x is a even number"
If I
Thank you Adam.
On Tue, Aug 10, 2010 at 7:03 PM, Adam Bark wrote:
> On 11/08/10 02:34, Sudarshana Banerjee wrote:
>
> Hi: I am trying to teach myself Python, and am stuck at the indentation
> with the elif statement.
>
> This is what I am trying to type (as copied from the
u example given
> that has nothing to
> do with the rest of the code.
>
> Regards
> Karim
>
>
>
> On 08/11/2010 03:34 AM, Sudarshana Banerjee wrote:
>
>>print "x is a even number"
>>
>
>
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
d press enter twice to tell the console you are done, you
> shouldn't get an error that way.
> You should get something like below:
>
> >>> x=3
> >>> if x==0:
> ... print x,'is zero'
> ... elif x//1==1:
> ... print x,'is odd'
> ... elif x
really
helpful; and I have added it to my bookmarks.
Thanks a ton!
Sudarshana.
On Fri, Aug 13, 2010 at 1:27 AM, Alan Gauld wrote:
>
> "Sudarshana Banerjee" wrote
>
>
> Could you take a look at this please:
>>
>>> x=3
>>>>>