// Numbas version: exam_results_page_options {"name": "Set theory: Union and Intersection", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"js": "", "css": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "name": "Set theory: Union and Intersection", "ungrouped_variables": ["a", "b", "c", "d", "f", "universal", "set1", "set2", "set3"], "statement": "

Let:

\n

$A=\\{x \\in \\mathbb{N}\\;|\\;\\var{b}\\leq x \\leq \\var{c}\\}$.

\n

$B=\\{x \\in \\mathbb{N}\\;|\\;x \\gt \\var{d}\\}$.

\n

$C=\\{ x \\in \\mathbb{N}\\;|\\; x \\text{ divisible by } \\var{f}\\}$.

\n

\n

", "rulesets": {}, "tags": [], "parts": [{"prompt": "

Enumerate the following sets:

\n

a) $A \\cup C=\\;$[[0]]

\n

b) $\\overline{B} \\cap C=\\;$[[1]]

\n

c) $A \\cup \\overline{B}=\\;$[[2]]

\n

d) $(A \\cap B) \\cup C=\\;$[[3]]

\n

\n

Note that you input sets in the form set(a,b,c,..,z) .

\n

For example set(1,2,3)gives the set $\\{1,2,3\\}$.

\n

The empty set is input as set().

\n

It is safest to list all of the elements explicitly.

\n

", "variableReplacementStrategy": "originalfirst", "type": "gapfill", "gaps": [{"variableReplacements": [], "vsetrangepoints": 5, "marks": 1, "checkingaccuracy": 0.001, "showFeedbackIcon": true, "scripts": {}, "answer": "{set1 or set3}", "vsetrange": [0, 1], "variableReplacementStrategy": "originalfirst", "type": "jme", "showpreview": true, "showCorrectAnswer": false, "expectedvariablenames": [], "checkingtype": "absdiff", "checkvariablenames": false}, {"variableReplacements": [], "vsetrangepoints": 5, "marks": "2", "checkingaccuracy": 0.001, "showFeedbackIcon": true, "scripts": {}, "answer": "{(universal - set2) and set3}", "vsetrange": [0, 1], "variableReplacementStrategy": "originalfirst", "type": "jme", "showpreview": true, "showCorrectAnswer": false, "expectedvariablenames": [], "checkingtype": "absdiff", "checkvariablenames": false}, {"variableReplacements": [], "vsetrangepoints": 5, "marks": "2", "checkingaccuracy": 0.001, "showFeedbackIcon": true, "scripts": {}, "answer": "{set1 or (universal-set2)}", "vsetrange": [0, 1], "variableReplacementStrategy": "originalfirst", "type": "jme", "showpreview": true, "showCorrectAnswer": false, "expectedvariablenames": [], "checkingtype": "absdiff", "checkvariablenames": false}, {"variableReplacements": [], "vsetrangepoints": 5, "marks": "1", "checkingaccuracy": 0.001, "showFeedbackIcon": true, "scripts": {}, "answer": "{(set1 and set2) or set3}", "vsetrange": [0, 1], "variableReplacementStrategy": "originalfirst", "type": "jme", "showpreview": true, "showCorrectAnswer": false, "expectedvariablenames": [], "checkingtype": "absdiff", "checkvariablenames": false}], "variableReplacements": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "marks": 0}], "advice": "", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Given some random finite subsets of the natural numbers, perform set operations $\\cap,\\;\\cup$ and complement.

"}, "variable_groups": [], "extensions": [], "variables": {"c": {"group": "Ungrouped variables", "name": "c", "definition": "b+random(10..a-b)", "description": "", "templateType": "anything"}, "a": {"group": "Ungrouped variables", "name": "a", "definition": "random(15..30)", "description": "", "templateType": "anything"}, "set3": {"group": "Ungrouped variables", "name": "set3", "definition": "set(mod_set(0,a,f))", "description": "", "templateType": "anything"}, "d": {"group": "Ungrouped variables", "name": "d", "definition": "random(5..c-1)", "description": "", "templateType": "anything"}, "f": {"group": "Ungrouped variables", "name": "f", "definition": "random(2,3,5,6)", "description": "", "templateType": "anything"}, "universal": {"group": "Ungrouped variables", "name": "universal", "definition": "set(0..a)", "description": "", "templateType": "anything"}, "b": {"group": "Ungrouped variables", "name": "b", "definition": "random(3..8)", "description": "", "templateType": "anything"}, "set2": {"group": "Ungrouped variables", "name": "set2", "definition": "set(d+1..a)", "description": "", "templateType": "anything"}, "set1": {"group": "Ungrouped variables", "name": "set1", "definition": "set(b..c)", "description": "", "templateType": "anything"}}, "functions": {"mod_set": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"]], "type": "list", "definition": "//returns all integers which are divisible by c betweeen a and b\nvar l=[];\nfor(var i=a;i