// Numbas version: exam_results_page_options {"name": "Propositional Logic 1", "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", ""], "variable_overrides": [[], []], "questions": [{"name": "Alexander's copy of Andrew's copy of Propositions (v2)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Alexander Corner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5328/"}], "tags": [], "metadata": {"description": "

Asks to determine whether or not 6 statements are propositions or not i.e. we can determine a truth value or not.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Which of the following are propositions?

", "advice": "

For the above we have:

\n

1.  {all[select[0]][0]}

\n

{all[select[0]][1]}

\n

2.  {all[select[1]][0]}

\n

{all[select[1]][1]}

\n

3.  {all[select[2]][0]}

\n

{all[select[2]][1]}

\n

4.  {all[select[3]][0]}

\n

{all[select[3]][1]}

\n

5.  {all[select[4]][0]}

\n

{all[select[4]][1]}

\n

6.  {all[select[5]][0]}

\n

{all[select[5]][1]}

", "rulesets": {}, "variables": {"select": {"name": "select", "group": "Ungrouped variables", "definition": "shuffle(list(0..length(all)-1))[0..6]", "description": "", "templateType": "anything"}, "marking_matrix": {"name": "marking_matrix", "group": "Ungrouped variables", "definition": "map([all[x][2],(all[x][2])*(-1)+1],x,select)", "description": "", "templateType": "anything"}, "all": {"name": "all", "group": "Ungrouped variables", "definition": "[\n['Every real number is an even integer.','This is a proposition. It is false as there are real numbers which are not even integers, e.g. $1$.',1],\n ['Every even integer is a real number.','A proposition and true.',1],\n ['If $x$ and $y$ are real numbers and $5x=5y$, then $x=y$.','A true proposition as we can cancel off the 5s.',1],\n ['Lions and tigers.','This is not a proposition as there is no truth value we can determine.',0],\n ['Lions and tigers are animals.','This is a true proposition, at least in the standard interpretation of the words.',1],\n ['Some sets are finite.','A true proposition as, for example, the set $\\\\\\{1 \\\\\\}$ is finite.',1],\n ['The smallest positive whole number is 2.','This is a proposition and false, as the smallest positive whole number is $1$.',1],\n ['$x^2=5$.','This is not a proposition: its truth depends on the value of $x$.',0],\n ['If $n$ is a real number and $n$ is not zero then $n/n=1$.','This a proposition: it is true.',1],\n ['The integer $x$ is a multiple of $7$.','Not a proposition. Its truth depends on the value of $x$.',0],\n ['If the integer $x$ is a multiple of $7$, then it is divisible by $7$.','A true proposition.',1],\n ['Either the integer $x$ is a multiple of $7$, or it is not.','A proposition and true.',1],\n ['Call me Ishmael.','Not a proposition as we cannot ascertain a truth value.',0],\n ['Either $x>3$ or $x<0$.','Not a proposition: its truth depends on the value of $x$.',0],\n ['They like fishcakes.','Not a proposition. Its truth depends on who \"They\" are.',0],\n ['In the beginning.','Not a proposition: is neither true nor false.',0],\n ['Sheffield Hallam University is a much better place to get your degree.','Not a proposition. It depends on what \"better\" refers to.',0],\n ['To be or not to be.','Not a proposition: is neither true nor false.',0],\n ['Derby County football club is at its peak.','Not a proposition. It depends on when it is said, and what \"peak\" means.',0],\n ['Newcastle United finished above Sunderland in the 2014-2015 Season.','A proposition. It is true, according to the records.',1],\n ['England and the UK are two different names for the same place.', 'A proposition. People from England may say it is true. They are wrong.',1],\n ['If $3x^2-2=0$ then $x=\\\\sqrt{2/3}$ or $x=-\\\\sqrt{2/3}$','A proposition. It does not depend what $x$ is. It is true.',1],\n ['Numbers $x$, $y$ and $z$ have the property that $x+y=z$.','Not a proposition, as its truth depends on the values of $x$, $y$ and $z$.',0],\n ['Numbers $x$, $y$ and $z$ have the property that $x+y>z$ or $x+y \\\\le z$.', 'A proposition. One or other of the conditions holds.',1] \n ]", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["all", "select", "marking_matrix"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "m_n_x", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "minAnswers": 0, "maxAnswers": 0, "shuffleChoices": false, "shuffleAnswers": false, "displayType": "radiogroup", "warningType": "none", "showCellAnswerState": true, "choices": ["{all[select[0]][0]}", "{all[select[1]][0]}", "{all[select[2]][0]}", "{all[select[3]][0]}", "{all[select[4]][0]}", "{all[select[5]][0]}"], "matrix": "marking_matrix", "layout": {"type": "all", "expression": ""}, "answers": ["Proposition", "Not a proposition"]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Alexander's copy of Truth tables 0 (v2)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Alexander Corner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5328/"}], "tags": [], "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$.

\n

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

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

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

\n

\\[\\var{a} \\var{op} \\var{b}.\\]

\n

\n

Enter T if true, else enter F.

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

\n

", "advice": "

Here is the 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
$p$$q$$\\var{a} \\var{op} \\var{b}$
$\\var{disp[0]}$$\\var{disq[0]}$$\\var{ev1[0]}$
$\\var{disp[1]}$$\\var{disq[1]}$$\\var{ev1[1]}$
$\\var{disp[2]}$$\\var{disq[2]}$$\\var{ev1[2]}$
$\\var{disp[3]}$$\\var{disq[3]}$$\\var{ev1[3]}$
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"disp": {"name": "disp", "group": "Truth values", "definition": "bool_to_label(p)", "description": "", "templateType": "anything", "can_override": false}, "q": {"name": "q", "group": "Truth values", "definition": "[true,false,true,false]", "description": "", "templateType": "anything", "can_override": false}, "disq": {"name": "disq", "group": "Truth values", "definition": "bool_to_label(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}, "op": {"name": "op", "group": "First Bracket", "definition": "latex(random(\"\\\\lor\",\"\\\\land\"))", "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}, "s": {"name": "s", "group": "Lists of symbols", "definition": "repeat(random(0..3),4)", "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}, "p": {"name": "p", "group": "Truth values", "definition": "[true,true,false,false]", "description": "", "templateType": "anything", "can_override": false}, "logic_symbol_list": {"name": "logic_symbol_list", "group": "Lists of symbols", "definition": "[\"p\",\"q\",\"not p\",\"not q\"]", "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}}, "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", "op", "pre_ev1", "ev1"]}, {"name": "Second Bracket", "variables": []}, {"name": "Truth values", "variables": ["q", "p", "disp", "disq"]}], "functions": {"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]\")"}, "evaluate": {"parameters": [["expr", "string"], ["dependencies", "list"]], "type": "number", "language": "javascript", "definition": "return scope.evaluate(expr);"}, "conv": {"parameters": [["op", "string"]], "type": "string", "language": "jme", "definition": "switch(op=\"\\\\land\",\"and\",op=\"\\\\lor\",\"or\",\"implies\")"}, "bool_to_label": {"parameters": [["l", "list"]], "type": "number", "language": "jme", "definition": "map(if(l[x],'T','F'),x,0..length(l)-1)"}}, "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": "

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
$p$$q$$\\var{a} \\var{op} \\var{b}$
$\\var{disp[0]}$$\\var{disq[0]}$[[0]]
$\\var{disp[1]}$$\\var{disq[1]}$[[1]]
$\\var{disp[2]}$$\\var{disq[2]}$[[2]]
$\\var{disp[3]}$$\\var{disq[3]}$[[3]]
", "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": true, "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"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "end_message": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Alexander Corner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5328/"}], "extensions": [], "custom_part_types": [], "resources": []}