// Numbas version: exam_results_page_options {"name": "Hina's copy of Variable number of choices in a multiple choice part", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "", "tags": ["demo"], "rulesets": {}, "statement": "", "parts": [{"displayColumns": 0, "choices": "people", "shuffleChoices": false, "matrix": "marking", "displayType": "radiogroup", "variableReplacements": [], "marks": 0, "prompt": "

The following table gives the number of World Motor League championships won by the top {num_people} drivers in the world.

\n

{table([data],people)}

\n

Which driver has won the most world championships?

", "variableReplacementStrategy": "originalfirst", "minMarks": 0, "maxMarks": 0, "type": "1_n_2", "showCorrectAnswer": true, "scripts": {}}, {"marks": 0, "answers": "numbers", "choices": ["

2

", "

3

", "

5

"], "shuffleAnswers": false, "matrix": "mark_divisible", "displayType": "checkbox", "variableReplacements": [], "type": "m_n_x", "prompt": "

Which of the following numbers are divisible by 2, 3 or 5?

", "warningType": "none", "variableReplacementStrategy": "originalfirst", "minMarks": 0, "maxMarks": 0, "showCorrectAnswer": true, "maxAnswers": 0, "layout": {"type": "all", "expression": ""}, "scripts": {}, "minAnswers": 0, "shuffleChoices": false}], "variable_groups": [{"variables": ["num_people", "people", "data", "marking"], "name": "Part a"}, {"variables": ["numbers", "divisible", "total_divisible", "mark_divisible"], "name": "Part b"}], "metadata": {"description": "", "notes": "", "licence": "Creative Commons Attribution 4.0 International"}, "functions": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "ungrouped_variables": [], "name": "Hina's copy of Variable number of choices in a multiple choice part", "preamble": {"js": "", "css": ""}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "pickQuestions": 0, "name": ""}], "type": "question", "showQuestionGroupNames": false, "variables": {"total_divisible": {"templateType": "anything", "description": "

Total number of ticks in the matrix

", "name": "total_divisible", "group": "Part b", "definition": "sum(map(sum(x),x,list(divisible)))"}, "people": {"templateType": "anything", "description": "", "name": "people", "group": "Part a", "definition": "map('\\$p_'+j+'\\$',j,1..num_people)"}, "num_people": {"templateType": "randrange", "description": "", "name": "num_people", "group": "Part a", "definition": "random(3..8#1)"}, "numbers": {"templateType": "anything", "description": "

A random set of numbers to test for divisibility.

\n

There's always at least one even number, so there's at least one thing for the student to tick

", "name": "numbers", "group": "Part b", "definition": "let(even,random(4..24#2),\n sort(shuffle(5..25 except even)[0..random(2..5)]+[even])\n)"}, "mark_divisible": {"templateType": "anything", "description": "

Marking matrix for the divisibility question - make sure total marks available is 3, and subtract marks for incorrect ticks.

", "name": "mark_divisible", "group": "Part b", "definition": "matrix(map(\n map(if(p|n,1,-1),n,numbers),\n p,\n [2,3,5]\n))*3/total_divisible"}, "marking": {"templateType": "anything", "description": "

Marking array - 1 point if this person has the highest value of data.

", "name": "marking", "group": "Part a", "definition": "map(award(1,data[j]=max(data)),j,0..num_people-1)"}, "data": {"templateType": "anything", "description": "

A number for each person. There is a unique maximum: we generate n-1 values, then add another one by adding a random amount to the largest of the existing values.

", "name": "data", "group": "Part a", "definition": "let(d,repeat(random(1..10),num_people-1),\n shuffle([max(d)+random(1..3)]+d)\n)"}, "divisible": {"templateType": "anything", "description": "

Is n divisible by p?

", "name": "divisible", "group": "Part b", "definition": "matrix(map(\n map(award(1,p|n),n,numbers),\n p,\n [2,3,5]\n))"}}, "contributors": [{"name": "Hina Ahmed", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1160/"}]}]}], "contributors": [{"name": "Hina Ahmed", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1160/"}]}