// Numbas version: exam_results_page_options {"name": "Amy's second copy of Question 10 length of vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "c", "d"], "name": "Amy's second copy of Question 10 length of vectors", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

x is a vector holding the sequence of numbers between $\\var{a}$ and $\\var{a+c-1}$, inclusive, i.e. {join(list(a..a+c-1),', ')}.

\n

length(x) gives the number of elements in x. x has $\\var{c}$ elements.

\n

$y = 1/\\operatorname{length}(x) = 1/\\var{c} = \\var{1/c}$

", "rulesets": {}, "parts": [{"displayColumns": 0, "prompt": "

What is the value of $y$?

", "matrix": ["1", 0, 0, 0], "shuffleChoices": true, "variableReplacements": [], "choices": ["

{1/c}

", "

{1/({c}+{a}+{d})}

", "

{{c}+{d}}

", "

{c}

"], "variableReplacementStrategy": "originalfirst", "maxMarks": "1", "distractors": ["", "", "", ""], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}], "extensions": [], "statement": "
> x = seq({a},{c+a-1})
> y = 1/(length(x))
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(1..10#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(4..10#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "c", "description": ""}, "d": {"definition": "random(1..10#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "d", "description": ""}}, "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Amy Chadwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/505/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Amy Chadwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/505/"}]}