// Numbas version: finer_feedback_settings
{"name": "Luis's copy of set1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": [], "statement": "
Write the following sets in enumerated form.
\nNote that you enter an enumerated set such as $\\{35,67,99\\}$ as set(35,67,99)
.
\n", "name": "Luis's copy of set1", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "ungrouped_variables": ["a", "b", "c", "answer_set1", "d", "f", "g", "answer_set2", "r", "answer_set3", "answer_set4"], "parts": [{"prompt": "a) $A=\\{x \\in \\mathbb{N}\\;|\\;\\var{a} \\leq x \\leq \\var{b}\\text{ and } x \\text{ is divisible by }\\var{c}\\}$.
\n$A=\\;$[[0]]
\nb) $B=\\{x \\in \\mathbb{Z}\\;|\\;\\var{d} \\leq x \\leq \\var{f}\\text{ and } x^2 \\lt \\var{g}\\}$.
\n$B=\\;$[[1]]
\nc) $C=\\{x \\in \\mathbb{Z}\\;|\\;\\var{d} \\leq x \\leq \\var{f}\\text{ and } x^2 \\gt \\var{g}\\}$.
\n$C=\\;$[[2]]
\nd) $A \\cap C=\\;$[[3]]
\n\nNote that you input sets in the form set(a,b,c,..,z)
.
\nFor example set(1,2,3)
gives the set $\\{1,2,3\\}$.
\nThe empty set is input as set()
.
\nAlso some labour saving tips:
\nIf 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)
.
\nIf 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).
", "gaps": [{"checkvariablenames": false, "variableReplacements": [], "showCorrectAnswer": true, "answer": "{answer_set1}", "vsetrange": [0, 1], "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "vsetrangepoints": 5, "type": "jme", "marks": 1, "checkingtype": "absdiff", "scripts": {}, "checkingaccuracy": 0.001, "showpreview": true}, {"checkvariablenames": false, "variableReplacements": [], "showCorrectAnswer": true, "answer": "{answer_set2}", "vsetrange": [0, 1], "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "vsetrangepoints": 5, "type": "jme", "marks": 1, "checkingtype": "absdiff", "scripts": {}, "checkingaccuracy": 0.001, "showpreview": true}, {"checkvariablenames": false, "variableReplacements": [], "showCorrectAnswer": true, "answer": "{answer_set3}", "vsetrange": [0, 1], "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "vsetrangepoints": 5, "type": "jme", "marks": 1, "checkingtype": "absdiff", "scripts": {}, "checkingaccuracy": 0.001, "showpreview": true}, {"checkvariablenames": false, "variableReplacements": [], "showCorrectAnswer": true, "answer": "{answer_set4}", "vsetrange": [0, 1], "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "vsetrangepoints": 5, "type": "jme", "marks": 1, "checkingtype": "absdiff", "scripts": {}, "checkingaccuracy": 0.001, "showpreview": true}], "marks": 0, "variableReplacements": [], "showCorrectAnswer": true, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "scripts": {}}], "variables": {"answer_set4": {"definition": "answer_set1 and answer_set3", "name": "answer_set4", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "r": {"definition": "random(8..15)", "name": "r", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "c": {"definition": "random(3..7)", "name": "c", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "answer_set2": {"definition": "set(-r+1..r-1)and set(d..f)", "name": "answer_set2", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "f": {"definition": "random(10..25)", "name": "f", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "d": {"definition": "random(-25..-5)", "name": "d", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "b": {"definition": "a+random(12..30)", "name": "b", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "answer_set3": {"definition": "set(d..f) and(set(d-1..-r-1) or set(r+1..f+1))", "name": "answer_set3", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "a": {"definition": "random(8..20)", "name": "a", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "g": {"definition": "r^2", "name": "g", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "answer_set1": {"definition": "set(mod_set(a,b,c))", "name": "answer_set1", "templateType": "anything", "group": "Ungrouped variables", "description": ""}}, "variable_groups": [], "preamble": {"css": "", "js": ""}, "type": "question", "rulesets": {}, "advice": "", "showQuestionGroupNames": false, "functions": {"mod_set": {"definition": "//returns all integers which are divisible by c betweeen a and b\nvar l=[];\nfor(var i=a;i