// Numbas version: finer_feedback_settings {"name": "Luis's copy of Truth tables 0 (v2)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"showQuestionGroupNames": false, "variablesTest": {"maxRuns": "150", "condition": ""}, "tags": [], "metadata": {"notes": "", "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$.
\nFor example $\\neg q \\to \\neg p$.
", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"variableReplacements": [], "gaps": [{"variableReplacements": [], "answer": "{ev1[0]}", "marks": 1, "type": "patternmatch", "showCorrectAnswer": true, "scripts": {}, "displayAnswer": "{ev1[0]}", "variableReplacementStrategy": "originalfirst"}, {"variableReplacements": [], "answer": "{ev1[1]}", "marks": 1, "type": "patternmatch", "showCorrectAnswer": true, "scripts": {}, "displayAnswer": "{ev1[1]}", "variableReplacementStrategy": "originalfirst"}, {"variableReplacements": [], "answer": "{ev1[2]}", "marks": 1, "type": "patternmatch", "showCorrectAnswer": true, "scripts": {}, "displayAnswer": "{ev1[2]}", "variableReplacementStrategy": "originalfirst"}, {"variableReplacements": [], "answer": "{ev1[3]}", "marks": 1, "type": "patternmatch", "showCorrectAnswer": true, "scripts": {}, "displayAnswer": "{ev1[3]}", "variableReplacementStrategy": "originalfirst"}], "marks": 0, "type": "gapfill", "showCorrectAnswer": true, "scripts": {}, "prompt": "Complete the following truth table:
\n$p$ | $q$ | $\\var{a} \\var{op} \\var{b}$ |
---|---|---|
$\\var{disp[0]}$ | \n$\\var{disq[0]}$ | \n[[0]] | \n
$\\var{disp[1]}$ | \n$\\var{disq[1]}$ | \n[[1]] | \n
$\\var{disp[2]}$ | \n$\\var{disq[2]}$ | \n[[2]] | \n
$\\var{disp[3]}$ | \n$\\var{disq[3]}$ | \n[[3]] | \n
Here is the truth table.
\n$p$ | $q$ | $\\var{a} \\var{op} \\var{b}$ |
---|---|---|
$\\var{disp[0]}$ | \n$\\var{disq[0]}$ | \n$\\var{ev1[0]}$ | \n
$\\var{disp[1]}$ | \n$\\var{disq[1]}$ | \n$\\var{ev1[1]}$ | \n
$\\var{disp[2]}$ | \n$\\var{disq[2]}$ | \n$\\var{ev1[2]}$ | \n
$\\var{disp[3]}$ | \n$\\var{disq[3]}$ | \n$\\var{ev1[3]}$ | \n
In the following question you are asked to construct a truth table for:
\n\\[\\var{a} \\var{op} \\var{b}.\\]
\n\nEnter T if true, else enter F.
\n\n\n\n\n\n\n\n\n\n\n", "type": "question", "ungrouped_variables": [], "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "functions": {"evaluate": {"language": "javascript", "definition": "return scope.evaluate(expr);", "parameters": [["expr", "string"], ["dependencies", "list"]], "type": "number"}, "conv": {"language": "jme", "definition": "switch(op=\"\\\\land\",\"and\",op=\"\\\\lor\",\"or\",\"implies\")", "parameters": [["op", "string"]], "type": "string"}, "convch": {"language": "jme", "definition": "switch(ch=\"\\\\neg p\",\"not p[t]\",ch=\"\\\\neg q\",\"not q[t]\",ch=\"p\",\"p[t]\",\"q[t]\")", "parameters": [["ch", "string"]], "type": "string"}, "bool_to_label": {"language": "jme", "definition": "map(if(l[x],'T','F'),x,0..length(l)-1)", "parameters": [["l", "list"]], "type": "number"}}, "rulesets": {}, "variable_groups": [{"name": "Lists of symbols", "variables": ["logic_symbol_list", "latex_symbol_list", "s"]}, {"name": "First Bracket", "variables": ["a", "b", "op", "pre_ev1", "ev1"]}, {"name": "Second Bracket", "variables": []}, {"name": "Truth values", "variables": ["q", "p", "disp", "disq"]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Luis Hernandez", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2870/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Luis Hernandez", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2870/"}]}