Logic problem: need better logic for desired thruth table.

Jussi Piitulainen jpiitula at ling.helsinki.fi
Thu May 28 18:13:04 EDT 2015


Skybuck Flying writes:

> There are two booleans/variables which can be either false or true.
>
> The desired thrutle table is:
>
> A = input
> B = input
> C = output
>
> A B C:
> -------
> F F T
> F T F
> T F T
> T T T

That's A >= B, where True >= False:

  >>> BB = False, True
  >>> print(*((A, B, A >= B) for A in BB for B in BB), sep = '\n')
(False, False, True)
(False, True, False)
(True, False, True)
(True, True, True)
  >>> 



More information about the Python-list mailing list