// Numbas version: exam_results_page_options {"name": "Code block in a multiple choice part", "extensions": ["programming"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Code block in a multiple choice part", "tags": [], "metadata": {"description": "

The student is shown a passage of code in the prompt to a \"choose several from a list\" part.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "extensions": ["programming"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"code": {"name": "code", "group": "Ungrouped variables", "definition": "safe(\"def f(x):\\n return x*x\\n\\na = [f(i) for i in range(10)]\")", "description": "", "templateType": "long plain string", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["code"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "m_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Examine the following Python code:

\n

{code_block(code)}

\n

Tick all of the accurate statements about this code.

", "minMarks": 0, "maxMarks": "4", "shuffleChoices": false, "displayType": "checkbox", "displayColumns": "1", "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "markingMethod": "score per matched cell", "choices": ["The function f squares its input.", "The list comprehension a uses an anonymous function.", "The variable a is defined in the scope of f.", "a is a list with 10 elements."], "matrix": ["1", 0, 0, "1"], "distractors": ["", "", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}