Anonymous user
Twelve statements: Difference between revisions
m
→{{header|Python}}
m (→{{header|Python}}: Consistency with output) |
|||
Line 470:
Note: we choose to adapt the statement numbering to zero-based indexing in the constraintinfo lambda expressions but convert back to one-based on output.
The program uses brute force to generate all possible boolean values of the twelve statements then checks if the actual value of the statements matches the proposed or matches apart from exactly one deviation.
<lang python>
from itertools import product
|