// Numbas version: exam_results_page_options {"name": "Andrew's copy of Union, complement, intersection v2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "", "functions": {"mod_set": {"definition": "//returns all integers which are divisible by c betweeen a and b\nvar l=[];\nfor(var i=a;iIn 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

", "ungrouped_variables": ["a", "b", "c", "d", "f", "universal", "set1", "set2", "set3"], "variables": {"set1": {"definition": "set(b..c)", "description": "", "name": "set1", "templateType": "anything", "group": "Ungrouped variables"}, "set2": {"definition": "set(d+1..a)", "description": "", "name": "set2", "templateType": "anything", "group": "Ungrouped variables"}, "d": {"definition": "random(5..c-1)", "description": "", "name": "d", "templateType": "anything", "group": "Ungrouped variables"}, "universal": {"definition": "set(0..a)", "description": "", "name": "universal", "templateType": "anything", "group": "Ungrouped variables"}, "b": {"definition": "random(3..8)", "description": "", "name": "b", "templateType": "anything", "group": "Ungrouped variables"}, "f": {"definition": "random(2,3,5,6)", "description": "", "name": "f", "templateType": "anything", "group": "Ungrouped variables"}, "set3": {"definition": "set(mod_set(0,a,f))", "description": "", "name": "set3", "templateType": "anything", "group": "Ungrouped variables"}, "a": {"definition": "random(15..30)", "description": "", "name": "a", "templateType": "anything", "group": "Ungrouped variables"}, "c": {"definition": "b+random(10..a-b)", "description": "", "name": "c", "templateType": "anything", "group": "Ungrouped variables"}}, "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.

"}, "rulesets": {}, "extensions": [], "variable_groups": [], "tags": [], "preamble": {"js": "", "css": ""}, "name": "Andrew's copy of Union, complement, intersection v2", "parts": [{"marks": 0, "variableReplacementStrategy": "originalfirst", "gaps": [{"checkvariablenames": false, "showCorrectAnswer": false, "showFeedbackIcon": true, "checkingaccuracy": 0.001, "marks": 1, "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetrange": [0, 1], "variableReplacements": [], "vsetrangepoints": 5, "checkingtype": "absdiff", "scripts": {}, "showpreview": true, "answer": "{set1 or set3}", "expectedvariablenames": []}, {"checkvariablenames": false, "showCorrectAnswer": false, "showFeedbackIcon": true, "checkingaccuracy": 0.001, "marks": "2", "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetrange": [0, 1], "variableReplacements": [], "vsetrangepoints": 5, "checkingtype": "absdiff", "scripts": {}, "showpreview": true, "answer": "{(universal - set2) and set3}", "expectedvariablenames": []}, {"checkvariablenames": false, "showCorrectAnswer": false, "showFeedbackIcon": true, "checkingaccuracy": 0.001, "marks": "2", "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetrange": [0, 1], "variableReplacements": [], "vsetrangepoints": 5, "checkingtype": "absdiff", "scripts": {}, "showpreview": true, "answer": "{set1 or (universal-set2)}", "expectedvariablenames": []}, {"checkvariablenames": false, "showCorrectAnswer": false, "showFeedbackIcon": true, "checkingaccuracy": 0.001, "marks": "1", "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetrange": [0, 1], "variableReplacements": [], "vsetrangepoints": 5, "checkingtype": "absdiff", "scripts": {}, "showpreview": true, "answer": "{(set1 and set2) or set3}", "expectedvariablenames": []}], "showFeedbackIcon": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "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

", "type": "gapfill"}], "type": "question", "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}]}]}], "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}]}