// Numbas version: finer_feedback_settings {"name": "Truth tables De Morgan1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"p": {"definition": "[true,true,false,false]", "name": "p", "templateType": "anything", "description": "", "group": "Truth values"}, "q": {"definition": "[true,false,true,false]", "name": "q", "templateType": "anything", "description": "", "group": "Truth values"}, "logic_symbol_list": {"definition": "[\"p\",\"q\",\"not p\",\"not q\"]", "name": "logic_symbol_list", "templateType": "anything", "description": "", "group": "Lists of symbols"}, "latex_symbol_list": {"definition": "[\"p\",\"q\",\"\\\\neg p\",\"\\\\neg q\"]", "name": "latex_symbol_list", "templateType": "anything", "description": "", "group": "Lists of symbols"}, "disq": {"definition": "bool_to_label(q)", "name": "disq", "templateType": "anything", "description": "", "group": "Truth values"}, "s": {"definition": "repeat(random(0..3),4)", "name": "s", "templateType": "anything", "description": "", "group": "Lists of symbols"}, "disp": {"definition": "bool_to_label(p)", "name": "disp", "templateType": "anything", "description": "", "group": "Truth values"}}, "advice": "", "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": "150"}, "variable_groups": [{"variables": ["logic_symbol_list", "latex_symbol_list", "s"], "name": "Lists of symbols"}, {"variables": [], "name": "First Bracket"}, {"variables": [], "name": "Second Bracket"}, {"variables": ["q", "p", "disp", "disq"], "name": "Truth values"}], "extensions": [], "preamble": {"js": "", "css": ""}, "statement": "

\n

Complete the following truth table to prove De Morgan's law

\n

$\\neg(P \\land Q)=\\neg P \\lor \\neg Q$ 

\n

Enter T if true, else enter F.

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

", "parts": [{"showCorrectAnswer": true, "prompt": "

Complete the following 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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$P$$Q$$\\neg P$$\\neg Q$$P \\land Q$$\\neg(P\\land Q)$$\\neg P \\lor \\neg Q$
TT[[0]][[4]][[8]][[12]][[16]]
TF\n

[[1]]

\n
[[5]][[9]][[13]][[17]]
FT[[2]][[6]][[10]][[14]][[18]]
FF[[3]][[7]][[11]][[15]]\n

[[19]]

\n
", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 0, "variableReplacements": [], "type": "gapfill", "gaps": [{"showCorrectAnswer": true, "matchMode": "regex", "answer": "F", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "F"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "F", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "F"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "T", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "T"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "T", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "T"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "F", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "F"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "T", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "T"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "F", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "F"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "T", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "T"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "T", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "T"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "F", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "F"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "F", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "F"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "F", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "F"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "F", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "F"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "T", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "T"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "T", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "T"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "T", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "T"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "F", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "F"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "T", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "T"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "T", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "T"}, {"showCorrectAnswer": true, "matchMode": "regex", "answer": "T", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "marks": 1, "variableReplacements": [], "type": "patternmatch", "displayAnswer": "T"}]}], "name": "Truth tables De Morgan1", "metadata": {"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$.

", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": [], "functions": {"conv": {"definition": "switch(op=\"\\\\land\",\"and\",op=\"\\\\lor\",\"or\",\"implies\")", "type": "string", "parameters": [["op", "string"]], "language": "jme"}, "evaluate": {"definition": "return scope.evaluate(expr);", "type": "number", "parameters": [["expr", "string"], ["dependencies", "list"]], "language": "javascript"}, "convch": {"definition": "switch(ch=\"\\\\neg p\",\"not p[t]\",ch=\"\\\\neg q\",\"not q[t]\",ch=\"p\",\"p[t]\",\"q[t]\")", "type": "string", "parameters": [["ch", "string"]], "language": "jme"}, "bool_to_label": {"definition": "map(if(l[x],'T','F'),x,0..length(l)-1)", "type": "number", "parameters": [["l", "list"]], "language": "jme"}}, "tags": [], "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/"}]}