Building truth tables

andrea kerny404 at gmail.com
Fri Sep 26 12:45:39 CEST 2008


Well I would like to make a little program that given a certain
logical expression gives the complete truth table.

It's not too difficult in fact, I just have some doubts on how to
design it.

I thought something like that:

class Term:

class Table:

   def and(...
   def or(...


But I'm not convinced...
I would like something like that more or less:
a,b,c = Term()

table([a,b,c], impl(and(or(a,b)),c))

Any idea??
Thanks



More information about the Python-list mailing list