Re: [Tutor] using 'and ' and 'or' with integers

2013-01-09 Thread Alan Gauld
On 09/01/13 06:56, ken brockman wrote: 1 and 2 and 3 answer 3 I've goggled it till i was red in the fingers, but to no avail.. Could someone be kind enuff to direct me to some docs that explain this?? I've no clue what the hell is going on here.. Its to do with the way Python evaluates boole

Re: [Tutor] using 'and ' and 'or' with integers

2013-01-09 Thread Brian van den Broek
On 9 January 2013 01:56, ken brockman wrote: > I was looking through some lab material from a computer course offered at UC > Berkeley and came across some examples in the form of questions on a test > about python. > 1 and 2 and 3 > answer 3 > I've goggled it till i was red in the fingers, but t

Re: [Tutor] using 'and ' and 'or' with integers

2013-01-08 Thread Mitya Sirenef
On Wed 09 Jan 2013 01:56:20 AM EST, ken brockman wrote: I was looking through some lab material from a computer course offered at UC Berkeley and came across some examples in the form of questions on a test about python. 1 and 2 and 3 answer 3 I've goggled it till i was red in the fingers, but t

Re: [Tutor] using 'and ' and 'or' with integers

2013-01-08 Thread Andreas Perstinger
[Please don't send HTML to this list. Just use plain text] On 09.01.2013 07:56, ken brockman wrote: I was looking through some lab material from a computer course offered at UC Berkeley and came across some examples in the form of questions on a test about python. 1 and 2 and 3 answer 3 I've gog

[Tutor] using 'and ' and 'or' with integers

2013-01-08 Thread ken brockman
I was looking through some lab material from a computer course offered at UC Berkeley and came across some examples in the form of questions on a test about python. 1 and 2 and 3  answer 3 I've goggled it till i was red in the fingers, but to no avail.. Could someone be kind enuff to direct me t

Re: [Tutor] Using and

2010-02-21 Thread Kent Johnson
On Sun, Feb 21, 2010 at 8:44 AM, jim serson wrote: > Can anyone tell me if I can have my program check to see if something is > true the add to count > > For example something like > > if c_1 and c_2 and c_3 true: > >     count + 1 This will almost work as written. Try if c_1 and c_2 and

Re: [Tutor] Using and

2010-02-21 Thread Benno Lang
On 21 February 2010 22:44, jim serson wrote: > Can anyone tell me if I can have my program check to see if something is > true the add to count > > For example something like > > if c_1 and c_2 and c_3 true: >     count + 1 Your code currently throws the result of the count + 1 expression

Re: [Tutor] Using and

2010-02-21 Thread Wayne Werner
On Sun, Feb 21, 2010 at 7:44 AM, jim serson wrote: > Can anyone tell me if I can have my program check to see if something is > true the add to count > > For example something like > > if c_1 and c_2 and c_3 true: > count + 1 > > or if I can use it after splitting an input the proble

[Tutor] Using and

2010-02-21 Thread jim serson
Can anyone tell me if I can have my program check to see if something is true the add to count For example something like if c_1 and c_2 and c_3 true: count + 1 or if I can use it after splitting an input the problem is the input is variable so I don't know if I can do such a thi