a problem to solve

John Salerno johnjsal at NOSPAMgmail.com
Sat Mar 25 00:00:25 EST 2006


mensanator at aol.com wrote:

> No. First of all, combining them with the & operator would be
> the asnswer to having all four lamps lit in the same position.
> But you want exactly 3 (in any combination). The correct way
> to combine the switches (using my answer of a[7] b[2] c[5] d[3])
> is to use the boolean expression I gave you initially:

Ah, that makes sense. I think I have a handle on it now. Of course, you 
did the grunt work of making the hex list, which might not have been so 
fun, but now I can work on using it to get the solution. Once I do, I'd 
love to compare my answer to yours, because something tells me yours 
will be much more elegant. :)



More information about the Python-list mailing list