// Numbas version: exam_results_page_options {"name": "Hollie's copy of Union, Complement and Intersection of Sets", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["a", "b", "c", "d", "f", "universal", "set1", "set2", "set3"], "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.

"}, "advice": "", "preamble": {"css": "", "js": ""}, "extensions": [], "statement": "

In this question, the universal set is  $\\mathcal{U}=\\{x \\in \\mathbb{N}\\; | \\;x \\leq \\var{a}\\}$.

\n

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

", "tags": [], "rulesets": {}, "parts": [{"showCorrectAnswer": true, "gaps": [{"showpreview": true, "showCorrectAnswer": true, "scripts": {}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "variableReplacements": [], "vsetrange": [0, 1], "marks": 1, "type": "jme", "answer": "{set1 or set3}", "showFeedbackIcon": true, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst"}, {"showpreview": true, "showCorrectAnswer": true, "scripts": {}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "variableReplacements": [], "vsetrange": [0, 1], "marks": "2", "type": "jme", "answer": "{(universal - set2) and set3}", "showFeedbackIcon": true, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst"}, {"showpreview": true, "showCorrectAnswer": true, "scripts": {}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "variableReplacements": [], "vsetrange": [0, 1], "marks": "2", "type": "jme", "answer": "{set1 or (universal-set2)}", "showFeedbackIcon": true, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst"}, {"showpreview": true, "showCorrectAnswer": true, "scripts": {}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "variableReplacements": [], "vsetrange": [0, 1], "marks": "1", "type": "jme", "answer": "{(set1 and set2) or set3}", "showFeedbackIcon": true, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst"}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "prompt": "

Enumerate the following sets:

\n

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

\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

\n

"}], "functions": {"mod_set": {"language": "javascript", "type": "list", "parameters": [["a", "number"], ["b", "number"], ["c", "number"]], "definition": "//returns all integers which are divisible by c betweeen a and b\nvar l=[];\nfor(var i=a;i