// Numbas version: exam_results_page_options {"name": "Truth tables not", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"statement": "

In the following question you are asked to construct a truth table for:

\n

\n

$\\neg P$ 

\n

Enter T if true, else enter F.

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

", "advice": "", "parts": [{"showFeedbackIcon": true, "type": "gapfill", "marks": 0, "variableReplacements": [], "prompt": "

Complete the following truth table:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$P$$\\neg P $
T[[0]]
F[[1]]
", "showCorrectAnswer": true, "gaps": [{"showFeedbackIcon": true, "displayAnswer": "F", "type": "patternmatch", "marks": 1, "matchMode": "regex", "answer": "F", "variableReplacements": [], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "scripts": {}}, {"showFeedbackIcon": true, "displayAnswer": "T", "type": "patternmatch", "marks": 1, "matchMode": "regex", "answer": "T", "variableReplacements": [], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "scripts": {}}], "variableReplacementStrategy": "originalfirst", "scripts": {}}], "tags": [], "functions": {"conv": {"parameters": [["op", "string"]], "definition": "switch(op=\"\\\\land\",\"and\",op=\"\\\\lor\",\"or\",\"implies\")", "language": "jme", "type": "string"}, "evaluate": {"parameters": [["expr", "string"], ["dependencies", "list"]], "definition": "return scope.evaluate(expr);", "language": "javascript", "type": "number"}, "convch": {"parameters": [["ch", "string"]], "definition": "switch(ch=\"\\\\neg p\",\"not p[t]\",ch=\"\\\\neg q\",\"not q[t]\",ch=\"p\",\"p[t]\",\"q[t]\")", "language": "jme", "type": "string"}, "bool_to_label": {"parameters": [["l", "list"]], "definition": "map(if(l[x],'T','F'),x,0..length(l)-1)", "language": "jme", "type": "number"}}, "variablesTest": {"condition": "", "maxRuns": "150"}, "ungrouped_variables": [], "extensions": [], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Create a truth table for a logical expression of the form $a \\operatorname{op} b$ where $a, \\;b$ can be the Boolean variables $p,\\;q,\\;\\neg p,\\;\\neg q$ and $\\operatorname{op}$ one of $\\lor,\\;\\land,\\;\\to$.

\n

For example $\\neg q \\to \\neg p$.

"}, "variable_groups": [{"name": "Lists of symbols", "variables": ["logic_symbol_list", "latex_symbol_list", "s"]}, {"name": "First Bracket", "variables": []}, {"name": "Second Bracket", "variables": []}, {"name": "Truth values", "variables": ["q", "p", "disp", "disq"]}], "preamble": {"js": "", "css": ""}, "rulesets": {}, "variables": {"disq": {"definition": "bool_to_label(q)", "group": "Truth values", "name": "disq", "description": "", "templateType": "anything"}, "s": {"definition": "repeat(random(0..3),4)", "group": "Lists of symbols", "name": "s", "description": "", "templateType": "anything"}, "p": {"definition": "[true,true,false,false]", "group": "Truth values", "name": "p", "description": "", "templateType": "anything"}, "q": {"definition": "[true,false,true,false]", "group": "Truth values", "name": "q", "description": "", "templateType": "anything"}, "logic_symbol_list": {"definition": "[\"p\",\"q\",\"not p\",\"not q\"]", "group": "Lists of symbols", "name": "logic_symbol_list", "description": "", "templateType": "anything"}, "latex_symbol_list": {"definition": "[\"p\",\"q\",\"\\\\neg p\",\"\\\\neg q\"]", "group": "Lists of symbols", "name": "latex_symbol_list", "description": "", "templateType": "anything"}, "disp": {"definition": "bool_to_label(p)", "group": "Truth values", "name": "disp", "description": "", "templateType": "anything"}}, "name": "Truth tables not", "type": "question", "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}]}