// Numbas version: finer_feedback_settings
{"name": "Complete la tabla de verdad", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Complete la tabla de verdad", "tags": [], "metadata": {"description": "
\nCrear una tabla de verdad para una expresión lógica de la forma $ a \\ {op} \\ b $ donde $ a, \\; b $ pueden ser las variables booleanas $ p, \\; q, \\; \\neg p$ y $\\neg q $ y $\\ {op}$ puede ser uno de los operadores $ \\lor, \\; \\land, \\; \\to $.
\nPor ejemplo $ \\neg q \\to \\neg p $.
\n", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "En la siguiente pregunta se pide que construya una tabla de verdad para: $ \\var{a} \\var{op} \\var{b} $
\nIngresa V si es verdadero, sino ingrese F.
\n\n\n\n\n\n\n\n\n\n\n", "advice": "Here is the truth table.
\n\n\n$p$ | $q$ | $\\var{a} \\var{op} \\var{b}$ |
\n\n$\\var{disp[0]}$ | \n$\\var{disq[0]}$ | \n$\\var{ev1[0]}$ | \n
\n\n$\\var{disp[1]}$ | \n$\\var{disq[1]}$ | \n$\\var{ev1[1]}$ | \n
\n\n$\\var{disp[2]}$ | \n$\\var{disq[2]}$ | \n$\\var{ev1[2]}$ | \n
\n\n$\\var{disp[3]}$ | \n$\\var{disq[3]}$ | \n$\\var{ev1[3]}$ | \n
\n\n
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"q": {"name": "q", "group": "Truth values", "definition": "[true,false,true,false]", "description": "", "templateType": "anything", "can_override": false}, "latex_symbol_list": {"name": "latex_symbol_list", "group": "Lists of symbols", "definition": "[\"p\",\"q\",\"\\\\neg p\",\"\\\\neg q\"]", "description": "", "templateType": "anything", "can_override": false}, "disq": {"name": "disq", "group": "Truth values", "definition": "bool_to_label(q)", "description": "", "templateType": "anything", "can_override": false}, "op": {"name": "op", "group": "First Bracket", "definition": "latex(random(\"\\\\lor\",\"\\\\land\",\"\\\\to\"))", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Truth values", "definition": "[true,true,false,false]", "description": "", "templateType": "anything", "can_override": false}, "pre_ev1": {"name": "pre_ev1", "group": "First Bracket", "definition": "map(evaluate(convch(a)+\" \"+conv(op)+\" \"+convch(b),[p[t],q[t]]),t,0..3)", "description": "", "templateType": "anything", "can_override": false}, "disp": {"name": "disp", "group": "Truth values", "definition": "bool_to_label(p)", "description": "", "templateType": "anything", "can_override": false}, "logic_symbol_list": {"name": "logic_symbol_list", "group": "Lists of symbols", "definition": "[\"p\",\"q\",\"no p\",\"no q\"]", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "First Bracket", "definition": "latex(switch(a=\"p\",\"\\\\neg q\",a=\"q\",\"\\\\neg p\",a=\"\\\\neg p\",random(\"q\",\"\\\\neg q\"),random(\"p\",\"\\\\neg p\")))", "description": "", "templateType": "anything", "can_override": false}, "ev1": {"name": "ev1", "group": "First Bracket", "definition": "bool_to_label(pre_ev1)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "First Bracket", "definition": "latex(latex_symbol_list[s[0]])", "description": "", "templateType": "anything", "can_override": false}, "s": {"name": "s", "group": "Lists of symbols", "definition": "repeat(random(0..3),4)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": "150"}, "ungrouped_variables": [], "variable_groups": [{"name": "Lists of symbols", "variables": ["logic_symbol_list", "latex_symbol_list", "s"]}, {"name": "First Bracket", "variables": ["a", "b", "ev1", "op", "pre_ev1"]}, {"name": "Second Bracket", "variables": []}, {"name": "Truth values", "variables": ["q", "p", "disp", "disq"]}], "functions": {"conv": {"parameters": [["op", "string"]], "type": "string", "language": "jme", "definition": "switch(op=\"\\\\land\",\"and\",op=\"\\\\lor\",\"or\",\"implies\")"}, "convch": {"parameters": [["ch", "string"]], "type": "string", "language": "jme", "definition": "switch(ch=\"\\\\neg p\",\"not p[t]\",ch=\"\\\\neg q\",\"not q[t]\",ch=\"p\",\"p[t]\",\"q[t]\")"}, "bool_to_label": {"parameters": [["l", "list"]], "type": "number", "language": "jme", "definition": "map(if(l[x],'V','F'),x,0..length(l)-1)"}, "evaluate": {"parameters": [["expr", "string"], ["dependencies", "list"]], "type": "number", "language": "javascript", "definition": "return scope.evaluate(expr);"}}, "preamble": {"js": "", "css": ""}, "parts": [{"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": "Completa la siguiente tabla de verdad:
\n\n\n\n$p$ | \n$q$ | \n$\\var{a} \\var{op} \\var{b}$ | \n
\n\n$\\var{disp[0]}$ | \n$\\var{disq[0]}$ | \n[[0]] | \n
\n\n$\\var{disp[1]}$ | \n$\\var{disq[1]}$ | \n[[1]] | \n
\n\n$\\var{disp[2]}$ | \n$\\var{disq[2]}$ | \n[[2]] | \n
\n\n$\\var{disp[3]}$ | \n$\\var{disq[3]}$ | \n[[3]] | \n
\n\n
", "gaps": [{"type": "patternmatch", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{ev1[0]}", "displayAnswer": "{ev1[0]}", "matchMode": "regex"}, {"type": "patternmatch", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{ev1[1]}", "displayAnswer": "{ev1[1]}", "matchMode": "regex"}, {"type": "patternmatch", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{ev1[2]}", "displayAnswer": "{ev1[2]}", "matchMode": "regex"}, {"type": "patternmatch", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{ev1[3]}", "displayAnswer": "{ev1[3]}", "matchMode": "regex"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "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/"}]}