I have generated the following truth table for the following logic puzzle: https://brilliant.org/problems/from-signup/the-boxes/no-group/no-input/?signedup=true#=
It is for the car in the box problem, explained below: here are 3 boxes, exactly one of which has a car. You can keep the car if you pick the correct box!
On each box there is a statement, exactly one of which is true.
Box A: The car is in this box. Box B: The car is not in this box. Box C: The car is not in box A.
Which box has the car?
I want to be able to demonstrate that it is possible to derive the answer logically and systematically using truth tables and have devised the following one. The answer to the problem, according to the below table, shows that it has to be the SECOND ROW, because only in that one is there ONE single TRUE statement derived.
My question is - is there a simpler way to construct the truth table, and is this a truth table that has been correctly devised?
What is a starting point for coding this in Python for demonstration purposes?