// Numbas version: exam_results_page_options {"name": "Andrew's copy of 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": {"css": "", "js": ""}, "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

", "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": {}, "variables": {"d": {"name": "d", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(5..c-1)", "description": ""}, "c": {"name": "c", "group": "Ungrouped variables", "templateType": "anything", "definition": "b+random(10..a-b)", "description": ""}, "set2": {"name": "set2", "group": "Ungrouped variables", "templateType": "anything", "definition": "set(d+1..a)", "description": ""}, "a": {"name": "a", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(15..30)", "description": ""}, "f": {"name": "f", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(2,3,5,6)", "description": ""}, "set1": {"name": "set1", "group": "Ungrouped variables", "templateType": "anything", "definition": "set(b..c)", "description": ""}, "set3": {"name": "set3", "group": "Ungrouped variables", "templateType": "anything", "definition": "set(mod_set(0,a,f))", "description": ""}, "universal": {"name": "universal", "group": "Ungrouped variables", "templateType": "anything", "definition": "set(0..a)", "description": ""}, "b": {"name": "b", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(3..8)", "description": ""}}, "advice": "", "variablesTest": {"condition": "", "maxRuns": 100}, "extensions": [], "ungrouped_variables": ["a", "b", "c", "d", "f", "universal", "set1", "set2", "set3"], "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;iEnumerate 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", "variableReplacements": [], "gaps": [{"showFeedbackIcon": true, "checkingaccuracy": 0.001, "showCorrectAnswer": false, "expectedvariablenames": [], "variableReplacements": [], "checkvariablenames": false, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "marks": "2", "scripts": {}, "showpreview": true, "vsetrange": [0, 1], "answer": "{set1 or set3}", "type": "jme", "vsetrangepoints": 5}, {"showFeedbackIcon": true, "checkingaccuracy": 0.001, "showCorrectAnswer": false, "expectedvariablenames": [], "variableReplacements": [], "checkvariablenames": false, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "marks": "3", "scripts": {}, "showpreview": true, "vsetrange": [0, 1], "answer": "{(universal - set2) and set3}", "type": "jme", "vsetrangepoints": 5}, {"showFeedbackIcon": true, "checkingaccuracy": 0.001, "showCorrectAnswer": false, "expectedvariablenames": [], "variableReplacements": [], "checkvariablenames": false, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "marks": "3", "scripts": {}, "showpreview": true, "vsetrange": [0, 1], "answer": "{set1 or (universal-set2)}", "type": "jme", "vsetrangepoints": 5}, {"showFeedbackIcon": true, "checkingaccuracy": 0.001, "showCorrectAnswer": false, "expectedvariablenames": [], "variableReplacements": [], "checkvariablenames": false, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "marks": "2", "scripts": {}, "showpreview": true, "vsetrange": [0, 1], "answer": "{(set1 and set2) or set3}", "type": "jme", "vsetrangepoints": 5}], "variableReplacementStrategy": "originalfirst"}], "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/"}]}