// 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": "
\nComplete the following truth table to prove De Morgan's law
\n$\\neg(P \\land Q)=\\neg P \\lor \\neg Q$
\nEnter 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$P$ | \n$Q$ | \n$\\neg P$ | \n$\\neg Q$ | \n$P \\land Q$ | \n$\\neg(P\\land Q)$ | \n$\\neg P \\lor \\neg Q$ | \n
\n\nT | \nT | \n[[0]] | \n[[4]] | \n[[8]] | \n[[12]] | \n[[16]] | \n
\n\nT | \nF | \n\n [[1]] \n | \n[[5]] | \n[[9]] | \n[[13]] | \n[[17]] | \n
\n\nF | \nT | \n[[2]] | \n[[6]] | \n[[10]] | \n[[14]] | \n[[18]] | \n
\n\nF | \nF | \n[[3]] | \n[[7]] | \n[[11]] | \n[[15]] | \n\n [[19]] \n | \n
\n\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$.
\nFor 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/"}]}