// Numbas version: finer_feedback_settings {"name": "Luis's copy of Andrew's copy of set3", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"variableReplacementStrategy": "originalfirst", "gaps": [{"answer": "{set1 and set2}", "vsetrange": [0, 1], "notallowed": {"showStrings": false, "partialCredit": 0, "strings": ["or", "and", "union", "intersect"], "message": "

Enumerate the set explicitly - your answer may not include set arithmetic operations.

"}, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "checkingaccuracy": 0.001, "showpreview": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showCorrectAnswer": true, "marks": 1, "checkvariablenames": false, "expectedvariablenames": [], "vsetrangepoints": 5}], "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

$A \\cap B=\\;$[[0]]

", "scripts": {}, "marks": 0, "type": "gapfill"}, {"variableReplacementStrategy": "originalfirst", "gaps": [{"answer": "{set2 and set3}", "vsetrange": [0, 1], "notallowed": {"showStrings": false, "partialCredit": 0, "strings": ["or ", "intersect", "and ", "union "], "message": "

Enumerate the set explicitly - your answer may not include set arithmetic operations.

"}, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "checkingaccuracy": 0.001, "showpreview": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showCorrectAnswer": true, "marks": 1, "checkvariablenames": false, "expectedvariablenames": [], "vsetrangepoints": 5}], "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

$B \\cap C=\\;$[[0]]

", "scripts": {}, "marks": 0, "type": "gapfill"}, {"variableReplacementStrategy": "originalfirst", "gaps": [{"answer": "{set1 and (universal-set3)}", "vsetrange": [0, 1], "notallowed": {"showStrings": false, "partialCredit": 0, "strings": ["or", "and", "union", "intersect"], "message": "

Enumerate the set explicitly - your answer may not include set arithmetic operations.

"}, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "checkingaccuracy": 0.001, "showpreview": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showCorrectAnswer": true, "marks": 1, "checkvariablenames": false, "expectedvariablenames": [], "vsetrangepoints": 5}], "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

$A \\cap C^c=\\;$[[0]]

", "scripts": {}, "marks": 0, "type": "gapfill"}, {"variableReplacementStrategy": "originalfirst", "gaps": [{"answer": "{((universal-set1) or set3) and set2}", "vsetrange": [0, 1], "notallowed": {"showStrings": false, "partialCredit": 0, "strings": ["or", "and", "union", "intersect"], "message": "

Enumerate the set explicitly - your answer may not include set arithmetic operations.

"}, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "checkingaccuracy": 0.001, "showpreview": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showCorrectAnswer": true, "marks": 1, "checkvariablenames": false, "expectedvariablenames": [], "vsetrangepoints": 5}], "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

$(A^c \\cup C) \\cap B=\\;$[[0]]

", "scripts": {}, "marks": 0, "type": "gapfill"}, {"variableReplacementStrategy": "originalfirst", "gaps": [{"answer": "{(universal-(set1 or set3)) and (universal-set2)}", "vsetrange": [0, 1], "notallowed": {"showStrings": false, "partialCredit": 0, "strings": ["or", "and", "union", "intersect"], "message": "

Enumerate the set explicitly - your answer may not include set arithmetic operations.

"}, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "checkingaccuracy": 0.001, "showpreview": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showCorrectAnswer": true, "marks": 1, "checkvariablenames": false, "expectedvariablenames": [], "vsetrangepoints": 5}], "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

$(A \\cup C)^c \\cap B^c=\\;$[[0]]

", "scripts": {}, "marks": 0, "type": "gapfill"}, {"variableReplacementStrategy": "originalfirst", "gaps": [{"answer": "{(set1 or (universal-set2)) and set3}", "vsetrange": [0, 1], "notallowed": {"showStrings": false, "partialCredit": 0, "strings": ["or", "and", "union", "intersect"], "message": "

Enumerate the set explicitly - your answer may not include set arithmetic operations.

"}, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "checkingaccuracy": 0.001, "showpreview": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showCorrectAnswer": true, "marks": 1, "checkvariablenames": false, "expectedvariablenames": [], "vsetrangepoints": 5}], "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

$(A \\cup B^c) \\cap C=\\;$[[0]]

", "scripts": {}, "marks": 0, "type": "gapfill"}], "name": "Luis's copy of Andrew's copy of set3", "ungrouped_variables": ["a", "b", "c", "d", "f", "universal", "set1", "set2", "set3"], "variables": {"a": {"description": "", "definition": "random(15..30)", "templateType": "anything", "name": "a", "group": "Ungrouped variables"}, "d": {"description": "", "definition": "random(5..c-1)", "templateType": "anything", "name": "d", "group": "Ungrouped variables"}, "set1": {"description": "", "definition": "set(b..c)", "templateType": "anything", "name": "set1", "group": "Ungrouped variables"}, "c": {"description": "", "definition": "b+random(10..a-b)", "templateType": "anything", "name": "c", "group": "Ungrouped variables"}, "f": {"description": "", "definition": "random(2,3,5,6)", "templateType": "anything", "name": "f", "group": "Ungrouped variables"}, "set2": {"description": "", "definition": "set(d+1..a)", "templateType": "anything", "name": "set2", "group": "Ungrouped variables"}, "set3": {"description": "", "definition": "set(mod_set(1,a,f))", "templateType": "anything", "name": "set3", "group": "Ungrouped variables"}, "b": {"description": "", "definition": "random(3..8)", "templateType": "anything", "name": "b", "group": "Ungrouped variables"}, "universal": {"description": "", "definition": "set(1..a)", "templateType": "anything", "name": "universal", "group": "Ungrouped variables"}}, "preamble": {"css": "", "js": ""}, "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

Enumerate the following sets.

\n

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

\n

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

\n

The empty set is input as set().

\n

Also some labour saving tips:

\n

If you want to input all integers between $a$ and $b$ inclusive then instead of writing all the elements you can input this as set(a..b).

\n

If you want to input all integers between $a$ and $b$ inclusive in steps of $c$ then this is input as set(a..b#c). So all odd integers from $-3$ to $28$ are input as set(-3..28#2).

\n

Notation set(a..b) and set(a,b,c) cannot be mixed. For example set(a..b,c) will not be processed as expected.

", "metadata": {"description": "", "notes": "", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {}, "functions": {"mod_set": {"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