// Numbas version: finer_feedback_settings {"name": "Basic R: Part 2b", "duration": 0, "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "allQuestions": true, "shuffleQuestions": false, "percentPass": 0, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "pickQuestions": 0, "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "allowregen": false, "showresultspage": "oncompletion", "preventleave": true, "browse": true, "showfrontpage": true}, "feedback": {"showtotalmark": true, "advicethreshold": 0, "allowrevealanswer": true, "feedbackmessages": [], "showactualmark": true, "showanswerstate": true, "intro": "", "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "never"}, "type": "exam", "questions": [], "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": [{"name": "Question 7 Sequences", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Amy Chadwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/505/"}], "functions": {}, "ungrouped_variables": [], "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

a) $x$ is defined as a sequence between 2 and 6, the step size hasn't been defined therefore it goes up in steps of 1.

\n

b) $z$ is defined as a sequence between 6 and 2, the step size hasn't been defined therefore it goes down in steps of 1.

", "rulesets": {}, "parts": [{"distractors": ["", "", "", ""], "prompt": "

What is the value of $x$?

", "matrix": ["1", 0, 0, 0], "shuffleChoices": false, "scripts": {}, "choices": ["

2 3 4 5 6

", "

2 6

", "

6 4 2

", "

2 3 5 6

"], "displayType": "radiogroup", "maxMarks": "1", "marks": 0, "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}, {"distractors": ["", "", "", ""], "prompt": "

What is the value of $z$?

", "matrix": [0, 0, 0, "1"], "shuffleChoices": false, "scripts": {}, "choices": ["

6 4 2 

", "

2 4 6

", "

2 3 4 5 6

", "

6 5 4 3 2

"], "displayType": "radiogroup", "maxMarks": "1", "marks": 0, "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}], "statement": "
> x = seq(2,6)
> z = seq(6,2)
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {}, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Question 8 Blob sequences", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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/"}], "functions": {}, "ungrouped_variables": [], "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

a) blob is defined as a sequence going backwards from $2$ to $-2$ by a step size of $2$. 

\n

b) splat is defined as a sequence going backwards from $2$ to $-2$ by a step size of $0.5$.

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

What is the value of blob?

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

-2 -1 0 1 2

", "

-2 0 2

", "

2 0 -2

", "

2 1 0 -1 -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 splat?

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

2 1 0 -1 -2

", "

0.5 1 1.5 2

", "

2 1.5 1 0.5 0 -0.5 -1 -1.5 -2

", "

-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

"], "variableReplacementStrategy": "originalfirst", "maxMarks": "1", "distractors": ["", "", "", ""], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}], "statement": "
> blob = seq(2,-2, by=-2)
> splat = seq(2,-2, by=-0.5)
", "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": []}]}, {"name": "Amy's second copy of Question 8 Blob sequences", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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/"}], "functions": {}, "ungrouped_variables": [], "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

a) blob is defined as a sequence going backwards from $6$ to $-6$ by a step size of $3$. 

\n

b) splat is defined as a sequence going backwards from $6$ to $2$ by a step size of $2$.

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

What is the value of blob?

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

6 -6

", "

6 4 2 0 -2 -4 -6

", "

6 0 -6

", "

6 3 0 -3 -6

"], "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 splat?

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

6 5 4 3 2

", "

2 4 6

", "

6 2

", "

6 4 2

"], "variableReplacementStrategy": "originalfirst", "maxMarks": "1", "distractors": ["", "", "", ""], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}], "statement": "
> blob = seq(6,-6, by=-3)
> splat = seq(6,2, by=-2)
", "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": []}]}, {"name": "Amy's third copy of Question 8 Blob sequences", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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/"}], "functions": {}, "ungrouped_variables": [], "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

a) blob is defined as a sequence going backwards from $5$ to $-5$ by a step size of $10$, so goes straight there! 

\n

b) splat is defined as a sequence going backwards from $5$ to $-5$ by a step size of $5$.

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

What is the value of blob?

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

5 -5

", "

5 4 3 2 1 -1 -2 -3 -4 -5

", "

-5 0 5

", "

5 0 -5

"], "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 splat?

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

5 -5

", "

5 0 -5

", "

-5 5

", "

-5 0 5

"], "variableReplacementStrategy": "originalfirst", "maxMarks": "1", "distractors": ["", "", "", ""], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}], "statement": "
> blob = seq(5,-5, by=-10)
> splat = seq(5,-5, by=-5)
", "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": []}]}, {"name": "Amy's copy of Question 8 Blob sequences", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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/"}], "functions": {}, "ungrouped_variables": [], "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

a) blob is defined as a sequence going backwards from $4$ to $-4$ by a step size of $2$. 

\n

b) splat is defined as a sequence going backwards from $2$ to $-2$ by a step size of $1$.

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

What is the value of blob?

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

4 2 0 -2 -4

", "

2 0 -2

", "

-4 -2 0 2 4

", "

4 3 2 1 0 -1 -2 -3 -4

"], "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 splat?

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

2 1 0 -1 -2

", "

1 0 -1

", "

2 0 -2

", "

-2 -1 0 1 2

"], "variableReplacementStrategy": "originalfirst", "maxMarks": "1", "distractors": ["", "", "", ""], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}], "statement": "
> blob = seq(4,-4, by=-2)
> splat = seq(2,-2, by=-1)
", "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": []}]}, {"name": "Amy's fourth copy of Question 7 Sequences", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Amy Chadwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/505/"}], "functions": {}, "ungrouped_variables": [], "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

a) $x$ is defined as a sequence between 10 and 15, the step size hasn't been defined therefore it goes up in steps of 1.

\n

b) $z$ is defined as a sequence between 10 and 5, the step size hasn't been defined therefore it goes down in steps of 1.

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

What is the value of $x$?

", "matrix": ["0", "0", "0", "1"], "shuffleChoices": false, "scripts": {}, "choices": ["

10 15

", "

11 12 13 14

", "

15

", "

10 11 12 13 14 15

"], "marks": 0, "displayType": "radiogroup", "maxMarks": "1", "distractors": ["", "", "", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}, {"prompt": "

What is the value of $z$?

", "matrix": ["0", "1", 0, "0"], "shuffleChoices": false, "scripts": {}, "choices": ["

10 5

", "

10 9 8 7 6 5

", "

9 8 7 6

", "

5

"], "marks": 0, "displayType": "radiogroup", "maxMarks": "1", "distractors": ["", "", "", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}], "statement": "
> x = seq(10,15)
> z = seq(10,5)
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {}, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Amy's third copy of Question 7 Sequences", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Amy Chadwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/505/"}], "functions": {}, "ungrouped_variables": [], "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

a) $x$ is defined as a sequence between 4 and 8, the step size hasn't been defined therefore it goes up in steps of 1.

\n

b) $z$ is defined as a sequence between 8 and 4, the step size hasn't been defined therefore it goes down in steps of 1.

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

What is the value of $x$?

", "matrix": ["1", "1", "0", 0], "shuffleChoices": false, "scripts": {}, "choices": ["

4 5 6 7 8

", "

4 6 8

", "

5 6 7

", "

4 8

"], "marks": 0, "displayType": "radiogroup", "maxMarks": "1", "distractors": ["", "", "", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}, {"prompt": "

What is the value of $z$?

", "matrix": ["0", "1", 0, "0"], "shuffleChoices": false, "scripts": {}, "choices": ["

8 4

", "

8 7 6 5 4

", "

8 6 4

", "

"], "marks": 0, "displayType": "radiogroup", "maxMarks": "1", "distractors": ["", "", "", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}], "statement": "
> x = seq(4,8)
> z = seq(8,4)
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {}, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Amy's second copy of Question 7 Sequences", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Amy Chadwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/505/"}], "functions": {}, "ungrouped_variables": [], "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

a) $x$ is defined as a sequence between 6 and 10, the step size hasn't been defined therefore it goes up in steps of 1.

\n

b) $z$ is defined as a sequence between 8 and 5, the step size hasn't been defined therefore it goes down in steps of 1.

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

What is the value of $x$?

", "matrix": ["0", "1", "0", 0], "shuffleChoices": false, "scripts": {}, "choices": ["

6 10

", "

6 7 8 9 10

", "

7 8 9 

", "

10 6

"], "marks": 0, "displayType": "radiogroup", "maxMarks": "1", "distractors": ["", "", "", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}, {"prompt": "

What is the value of $z$?

", "matrix": ["0", 0, 0, "1"], "shuffleChoices": false, "scripts": {}, "choices": ["

8 5

", "

7 6 5

", "

8 6

", "

8 7 6 5

"], "marks": 0, "displayType": "radiogroup", "maxMarks": "1", "distractors": ["", "", "", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}], "statement": "
> x = seq(6,10)
> z = seq(8,5)
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {}, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Amy's copy of Question 7 Sequences", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Amy Chadwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/505/"}], "functions": {}, "ungrouped_variables": [], "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

a) $x$ is defined as a sequence between 5 and 12, the step size hasn't been defined therefore it goes up in steps of 1.

\n

b) $z$ is defined as a sequence between 12 and 5, the step size hasn't been defined therefore it goes down in steps of 1.

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

What is the value of $x$?

", "matrix": ["0", 0, "1", 0], "shuffleChoices": false, "scripts": {}, "choices": ["

5 12

", "

12 10 8 6

", "

5 6 7 8 9 10 11 12

", "

6 7 8 9 10 11

"], "marks": 0, "displayType": "radiogroup", "maxMarks": "1", "distractors": ["", "", "", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}, {"prompt": "

What is the value of $z$?

", "matrix": ["1", 0, 0, "1"], "shuffleChoices": false, "scripts": {}, "choices": ["

12 11 10 9 8 7 6 5

", "

12 5

", "

11 10 9 8 7

", "

5 12

"], "marks": 0, "displayType": "radiogroup", "maxMarks": "1", "distractors": ["", "", "", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}], "statement": "
> x = seq(5,12)
> z = seq(12,5)
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {}, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Question 9 calculations with sequences", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Amy Chadwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/505/"}], "functions": {}, "ungrouped_variables": [], "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

a) Because $z=x/y$ you divide each component of the $x$ vector by the corresponding component of the $y$ vector in order to get $z$.

\n

b) $a=z/z$ so you divide each component of $z$ by itself.

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

What is the value of $z$? 

", "matrix": ["0", 0, 0, "1"], "shuffleChoices": false, "scripts": {}, "choices": ["

1 10 100 1000

", "

1 5 10 1000

", "

1 1 1 1

", "

1 2 10 10

"], "marks": 0, "displayType": "radiogroup", "maxMarks": "1", "distractors": ["", "", "", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}, {"prompt": "

What is the value of $a$?

", "matrix": [0, "1", 0, 0], "shuffleChoices": false, "scripts": {}, "choices": ["

1 2 10 10

", "

1 1 1 1

", "

1 5 10 100

", "

1 2 10 100

"], "marks": 0, "displayType": "radiogroup", "maxMarks": 0, "distractors": ["", "", "", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}], "statement": "
> x = c(1,10,100,1000)
> y = c(1,5,10,100)
> z = x/y
> a = z/z
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {}, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Question 11 harder sequences", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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/"}], "functions": {}, "ungrouped_variables": [], "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

a)

\n

First think of length(y). This is $5$ because y is the sequence of numbers between $2$ and $6$, inclusive, i.e. {join(list(2..6),' ')}.

\n

Then y[3:length(y)] means extract the third to fifth element of y, i.e. 4 5 6.

\n

b)

\n

Similarly, extract the second to third elements of x because length(x) = 3.

\n

c)

\n

The rev() function reverses the order of the given vector. 

\n

d)

\n

which(y==4) gives the index of the first occurrence of $4$ in y. The third element of y is $4$ therefore $b=3$.

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

What is the value of $x$?

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

2 3 4 5 6

", "

3 4 5 6

", "

4 5 6

", "

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": ["1", 0, 0, 0], "shuffleChoices": false, "variableReplacements": [], "choices": ["

5 6

", "

4 5

", "

4 5 6

", "

3 4 5 6

"], "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 $a$?

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

6 5

", "

6 5 4

", "

4 5 6

", "

5 6

"], "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 $b$?

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

4

", "

3

", "

2 3

", "

6

"], "variableReplacementStrategy": "originalfirst", "maxMarks": "1", "distractors": ["", "", "", ""], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}], "statement": "
> y = seq(2,6)
> x = y[3:length(y)]
> x
> z = x[2:length(x)]
> a = rev(z)
> b = which(y==4)
", "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/"}], "extensions": [], "custom_part_types": [], "resources": []}