// Numbas version: finer_feedback_settings {"name": "Amy's copy of Question 16 vector mean and range", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": [], "name": "Amy's copy of Question 16 vector mean and range", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "
x=1:10 creates a vector $x$ with 10 elements from 1 to 10.
\na)
\nThe function mean returns, as expected, the mean of the values in its argument, in this case the mean of the elements in the vector $x$.
\nb)
\nThe length function returns the length of its argument, in this case the number of elements in $x$.
", "rulesets": {}, "parts": [{"displayColumns": 0, "prompt": "What is the value of $y$?
", "matrix": ["1", "0", 0, 0], "shuffleChoices": true, "variableReplacements": [], "choices": ["$\\frac{11}{2}$
", "$\\frac{11}{4}$
", "$\\frac{1}{2}$
", "$\\frac{10}{2}$
"], "variableReplacementStrategy": "originalfirst", "maxMarks": "1", "distractors": ["", "", "", ""], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}, {"displayColumns": 0, "prompt": "What is the value of $z$?
", "matrix": [0, "1", "0", 0], "shuffleChoices": true, "variableReplacements": [], "choices": ["1 2 3 4 5 6 7 8 9 10
", "10
", "1 10
", "2
"], "variableReplacementStrategy": "originalfirst", "maxMarks": "1", "distractors": ["", "", "", ""], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}], "extensions": [], "statement": "> x = 1:10", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {}, "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Amy Chadwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/505/"}]}]}], "contributors": [{"name": "Amy Chadwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/505/"}]}
> y = mean(x)
> z = length(x)