// Numbas version: finer_feedback_settings {"name": "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": "Question 16 vector mean and range", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "
The function c combines the numbers in its argument into a vector, which in this case is assigned to $x$
\na)
\nThe function mean returns, as expected, the mean of the values in its argument.
\nb)
\nThe function range returns a vector containing the minimum and maximum of its argument, in this case the minimum and maximum of $x$, so $1$ and $6$. In fact we could have answered this without any further information; this was the only possible answer, as we expected a vector with 2 elements.
", "rulesets": {}, "parts": [{"displayColumns": 0, "prompt": "What is the value of $y$?
", "matrix": [0, "1", 0, 0], "shuffleChoices": false, "variableReplacements": [], "choices": ["$\\frac{7}{4}$
", "$\\frac{7}{2}$
", "$\\frac{6}{4}$
", "$\\frac{5}{3}$
"], "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, 0, "1", 0], "shuffleChoices": false, "variableReplacements": [], "choices": ["1 2 3 4 5 6
", "5
", "1 6
", "6
"], "variableReplacementStrategy": "originalfirst", "maxMarks": "1", "distractors": ["", "", "", ""], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}], "extensions": [], "statement": "> x = c(1,2,3,4,5,6)", "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 = range(x)