// Numbas version: exam_results_page_options {"name": "Boolean algebra: truth tables", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Boolean algebra: truth tables", "tags": [], "metadata": {"description": "", "licence": "All rights reserved"}, "statement": "", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"ABC": {"name": "ABC", "group": "Unnamed group", "definition": "transpose(matrix(product([0,1],2)))", "description": "", "templateType": "anything", "can_override": false}, "A": {"name": "A", "group": "Unnamed group", "definition": "list(ABC[0])", "description": "", "templateType": "anything", "can_override": false}, "B": {"name": "B", "group": "Unnamed group", "definition": "list(ABC[1])", "description": "", "templateType": "anything", "can_override": false}, "ops": {"name": "ops", "group": "Unnamed group", "definition": "product(0..4,0..0,0..1,0..1,0..1)", "description": "

List of possible questions.

\n

Entry 0: 0 (and), 1 (or), 2 (xor), 3 (implies), 4 (iff)

\n

Entry 1: unused

\n

Entry 2: 0 (A), 1 (not A)

\n

Entry 3: 0 (B), 1 (not B)

\n

Entry 4: 0 (C), 1 (not C) - unused

", "templateType": "anything", "can_override": false}, "qtype1": {"name": "qtype1", "group": "part a", "definition": "ops[qtypes[0]]", "description": "

entry 0: left operation

\n

entry 1: right operation

\n

entry 2: A (0) or not A (1)

\n

entry 3: B (0) or not B (1)

\n

entry 4: C (0) or not C (1)

\n

entry 5: brackets on the left (0) or brackets on the right (1)

", "templateType": "anything", "can_override": false}, "binary_symbols": {"name": "binary_symbols", "group": "Unnamed group", "definition": "[\" \\\\cdot \", \" + \", \" \\\\oplus \", \" \\\\implies \", \" \\\\Leftrightarrow \"]", "description": "

0: and

\n

1: or

\n

2: xor

\n

3: implies

\n

4: iff

", "templateType": "anything", "can_override": false}, "not_symbol": {"name": "not_symbol", "group": "Unnamed group", "definition": "[\" \\\\overline\\{ \",\" \\} \"]", "description": "", "templateType": "anything", "can_override": false}, "string1": {"name": "string1", "group": "part a", "definition": "\"$\"\n+\nswitch(qtype1[2]=0, \"A\", not_symbol[0] + \"A\" + not_symbol[1])\n+\nbinary_symbols[qtype1[0]]\n+\nswitch(qtype1[3]=0, \"B\", not_symbol[0] + \"B\" + not_symbol[1])\n+\n\"$\"", "description": "", "templateType": "anything", "can_override": false}, "Abar1": {"name": "Abar1", "group": "part a", "definition": "if(qtype1[2]=0, A, not(A))", "description": "", "templateType": "anything", "can_override": false}, "Bbar1": {"name": "Bbar1", "group": "part a", "definition": "if(qtype1[3]=0, B, not(B))", "description": "", "templateType": "anything", "can_override": false}, "final1": {"name": "final1", "group": "part a", "definition": "switch(qtype1[0] = 0, fn_and(Abar1,Bbar1),\n qtype1[0] = 1, fn_or(Abar1,Bbar1),\n qtype1[0] = 2, fn_xor(Abar1,Bbar1),\n qtype1[0] = 3, fn_implies(Abar1,Bbar1),\n fn_iff(Abar1,Bbar1))", "description": "

0: and

\n

1: or

\n

2: xor

\n

3: implies

\n

4: iff

", "templateType": "anything", "can_override": false}, "qtypes": {"name": "qtypes", "group": "Unnamed group", "definition": "shuffle(0..39)[0..3]", "description": "

Chooses three question types from the variable 'ops'.

", "templateType": "anything", "can_override": false}, "qtype2": {"name": "qtype2", "group": "part b", "definition": "ops[qtypes[1]]", "description": "", "templateType": "anything", "can_override": false}, "Abar2": {"name": "Abar2", "group": "part b", "definition": "if(qtype2[2]=0, A, not(A))", "description": "", "templateType": "anything", "can_override": false}, "Bbar2": {"name": "Bbar2", "group": "part b", "definition": "if(qtype2[3]=0, B, not(B))", "description": "", "templateType": "anything", "can_override": false}, "string2": {"name": "string2", "group": "part b", "definition": "\"$\"\n+\nswitch(qtype2[2]=0, \"A\", not_symbol[0] + \"A\" + not_symbol[1])\n+\nbinary_symbols[qtype2[0]]\n+\nswitch(qtype2[3]=0, \"B\", not_symbol[0] + \"B\" + not_symbol[1])\n+\n\"$\"", "description": "", "templateType": "anything", "can_override": false}, "final2": {"name": "final2", "group": "part b", "definition": "switch(qtype2[0] = 0, fn_and(Abar2,Bbar2),\n qtype2[0] = 1, fn_or(Abar2,Bbar2),\n qtype2[0] = 2, fn_xor(Abar2,Bbar2),\n qtype2[0] = 3, fn_implies(Abar2,Bbar2),\n fn_iff(Abar2,Bbar2))", "description": "", "templateType": "anything", "can_override": false}, "qtype3": {"name": "qtype3", "group": "Ungrouped variables", "definition": "ops[qtypes[2]]", "description": "", "templateType": "anything", "can_override": false}, "Abar3": {"name": "Abar3", "group": "Ungrouped variables", "definition": "if(qtype3[2]=0, A, not(A))", "description": "", "templateType": "anything", "can_override": false}, "Bbar3": {"name": "Bbar3", "group": "Ungrouped variables", "definition": "if(qtype3[3]=0, B, not(B))", "description": "", "templateType": "anything", "can_override": false}, "string3": {"name": "string3", "group": "Ungrouped variables", "definition": "\"$\"\n+\nswitch(qtype3[2]=0, \"A\", not_symbol[0] + \"A\" + not_symbol[1])\n+\nbinary_symbols[qtype3[0]]\n+\nswitch(qtype3[3]=0, \"B\", not_symbol[0] + \"B\" + not_symbol[1])\n+\n\"$\"", "description": "", "templateType": "anything", "can_override": false}, "final3": {"name": "final3", "group": "Ungrouped variables", "definition": "switch(qtype3[0] = 0, fn_and(Abar3,Bbar3),\n qtype3[0] = 1, fn_or(Abar3,Bbar3),\n qtype3[0] = 2, fn_xor(Abar3,Bbar3),\n qtype3[0] = 3, fn_implies(Abar3,Bbar3),\n fn_iff(Abar3,Bbar3))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["qtype3", "Abar3", "Bbar3", "string3", "final3"], "variable_groups": [{"name": "Unnamed group", "variables": ["binary_symbols", "not_symbol", "ABC", "A", "B", "ops", "qtypes"]}, {"name": "part a", "variables": ["qtype1", "Abar1", "Bbar1", "string1", "final1"]}, {"name": "part b", "variables": ["qtype2", "Abar2", "Bbar2", "string2", "final2"]}], "functions": {"fn_and": {"parameters": [["a", "list of number"], ["b", "list of number"]], "type": "list", "language": "javascript", "definition": "var Output = [];\nfor(var i=0; iFill in the truth table.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$A$$B${string1}
00[[0]]
01[[1]]
10[[2]]
11[[3]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{final1[0]}", "maxValue": "{final1[0]}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{final1[1]}", "maxValue": "{final1[1]}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{final1[2]}", "maxValue": "{final1[2]}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{final1[3]}", "maxValue": "{final1[3]}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Fill in the truth table.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$A$$B${string2}
00[[0]]
01[[1]]
10[[2]]
11[[3]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{final2[0]}", "maxValue": "{final2[0]}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{final2[1]}", "maxValue": "{final2[1]}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{final2[2]}", "maxValue": "{final2[2]}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{final2[3]}", "maxValue": "{final2[3]}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Fill in the truth table.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$A$$B${string3}
00[[0]]
01[[1]]
10[[2]]
11[[3]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{final3[0]}", "maxValue": "{final3[0]}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{final3[1]}", "maxValue": "{final3[1]}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{final3[2]}", "maxValue": "{final3[2]}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{final3[3]}", "maxValue": "{final3[3]}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Billy Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3527/"}]}]}], "contributors": [{"name": "Billy Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3527/"}]}