// Numbas version: exam_results_page_options {"name": "Andrew's copy of Sets 2-4", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"css": "", "js": ""}, "tags": [], "functions": {"mod_set": {"definition": "//returns all integers which are divisible by c betweeen a and b\nvar l=[];\nfor(var i=a;ia) $A=\\{x \\in \\mathbb{N}\\;|\\;\\var{a} \\leq x \\leq \\var{b}\\text{ and } x \\text{ is divisible by }\\var{c}\\}$.

\n

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

\n

b) $B=\\{x \\in \\mathbb{Z}\\;|\\;\\var{d} \\leq x \\leq \\var{f}\\text{ and } x^2 \\lt \\var{g}\\}$.

\n

$B=\\;$[[1]]

\n

c) $C=\\{x \\in \\mathbb{Z}\\;|\\;\\var{d} \\leq x \\leq \\var{f}\\text{ and } x^2 \\gt \\var{g}\\}$.

\n

$C=\\;$[[2]]

\n

d) $A \\cap 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

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).

", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0}], "rulesets": {}, "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "answer_set1", "d", "f", "g", "answer_set2", "r", "answer_set3", "answer_set4"], "extensions": [], "statement": "

Write the following sets in enumerated form.

\n

Note that you enter an enumerated set such as $\\{35,67,99\\}$ as set(35,67,99).

\n

", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variables": {"c": {"definition": "random(3..7)", "templateType": "anything", "description": "", "name": "c", "group": "Ungrouped variables"}, "f": {"definition": "random(10..25)", "templateType": "anything", "description": "", "name": "f", "group": "Ungrouped variables"}, "answer_set2": {"definition": "set(-r+1..r-1)and set(d..f)", "templateType": "anything", "description": "", "name": "answer_set2", "group": "Ungrouped variables"}, "answer_set4": {"definition": "answer_set1 and answer_set3", "templateType": "anything", "description": "", "name": "answer_set4", "group": "Ungrouped variables"}, "d": {"definition": "random(-25..-5)", "templateType": "anything", "description": "", "name": "d", "group": "Ungrouped variables"}, "answer_set1": {"definition": "set(mod_set(a,b,c))", "templateType": "anything", "description": "", "name": "answer_set1", "group": "Ungrouped variables"}, "b": {"definition": "a+random(12..30)", "templateType": "anything", "description": "", "name": "b", "group": "Ungrouped variables"}, "r": {"definition": "random(8..15)", "templateType": "anything", "description": "", "name": "r", "group": "Ungrouped variables"}, "answer_set3": {"definition": "set(d..f) and(set(d-1..-r-1) or set(r+1..f+1))", "templateType": "anything", "description": "", "name": "answer_set3", "group": "Ungrouped variables"}, "a": {"definition": "random(8..20)", "templateType": "anything", "description": "", "name": "a", "group": "Ungrouped variables"}, "g": {"definition": "r^2", "templateType": "anything", "description": "", "name": "g", "group": "Ungrouped variables"}}, "name": "Andrew's copy of Sets 2-4", "advice": "", "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/"}]}