On 3/29/06, Keo Sophon <[EMAIL PROTECTED]> wrote:
> Is it bitwise operator? Could you give one example?
>>> for a in range(2):
... for b in range(2):
... print a, b, a&b
...
0 0 0
0 1 0
1 0 0
1 1 1
> Sophon
S.
___
Tutor maillist - Tu
On Monday 27 March 2006 19:53, Steve Nelson wrote:
> On 3/27/06, josip <[EMAIL PROTECTED]> wrote:
> > Can someone give me exercises to do with loops, maybe functions to?
>
> How about a program that produces truth tables for the basic gates?
> AND, NAND, NOT, OR, XOR?
>
> You could write a function
On 3/27/06, josip <[EMAIL PROTECTED]> wrote:
> Can someone give me exercises to do with loops, maybe functions to?
How about a program that produces truth tables for the basic gates?
AND, NAND, NOT, OR, XOR?
You could write a function for each gate, and one to produce a truth table.
S.
__