// Numbas version: finer_feedback_settings {"name": "1.2.3.1 Is this a polynomial?", "extensions": [], "custom_part_types": [{"source": {"pk": 1, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/1/edit"}, "name": "Yes/no", "short_name": "yes-no", "description": "

The student is shown two radio choices: \"Yes\" and \"No\". One of them is correct.

", "help_url": "", "input_widget": "radios", "input_options": {"correctAnswer": "if(eval(settings[\"correct_answer_expr\"]), 0, 1)", "hint": {"static": true, "value": ""}, "choices": {"static": true, "value": ["Yes", "No"]}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\nif(studentanswer=correct_answer,\n correct(),\n incorrect()\n)\n\ninterpreted_answer:\nstudentAnswer=0\n\ncorrect_answer:\nif(eval(settings[\"correct_answer_expr\"]),0,1)", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=correct_answer,\n correct(),\n incorrect()\n)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "studentAnswer=0"}, {"name": "correct_answer", "description": "", "definition": "if(eval(settings[\"correct_answer_expr\"]),0,1)"}], "settings": [{"name": "correct_answer_expr", "label": "Is the answer \"Yes\"?", "help_url": "", "hint": "An expression which evaluates to true or false.", "input_type": "mathematical_expression", "default_value": "true", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "1.2.3.1 Is this a polynomial?", "tags": [], "metadata": {"description": "

Identify whether or not an expression is a polynomial. Part of HELM Book 1.2

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Is $\\var{q1_expr}$  a polynomial? 

", "advice": "

$\\var{q1_expr}$

\n

This expression contains a fraction term with the variable $\\var{expression(letter)}$ on the denominator, so it is not a polynomial.

\n

This expression contains a term with the square root of the variable $\\var{expression(letter)}$, so it is not a polynomial.

\n

This is a linear polynomial.

\n

This is a quadratic polynomial.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"q1_expr_array": {"name": "q1_expr_array", "group": "Ungrouped variables", "definition": "[\n string(random(-9,-8,-7,-6,-5,-4,-3-2,2,3,4,5,6,7,8,9)) + letter + \"^2 + \\\\frac\\{\" + string(random(1..9)) + \"\\}\\{\"+ letter +\"\\} +2\",\n \"\\\\frac\\{\"+ string(random(-9,-8,-7,-6,-5,-4,-3-2,2,3,4,5,6,7,8,9)) + \"\\}\\{\" + letter + \"+\" + string(random(1..9)) + \"\\}\",\n \"\\\\sqrt\\{\"+string(random(1..9))+letter+\"\\}\",\n string(random(-9,-8,-7,-6,-5,-4,-3-2,2,3,4,5,6,7,8,9)) + letter + \"+\" + string(random(1..9)),\n string(random(-9,-8,-7,-6,-5,-4,-3-2,2,3,4,5,6,7,8,9)) + letter + \"^2+\"+ string(random(1..9)) + letter +\"+\"+string(random(1..9))\n ]", "description": "

[containing an x^(-1) term, hyperbola, surd, linear, quadratic]

", "templateType": "anything", "can_override": false}, "letter": {"name": "letter", "group": "Ungrouped variables", "definition": "random(['a','b','c','d','m','n','p','q','r','s','t','w','x','y','z'])", "description": "", "templateType": "anything", "can_override": false}, "q1_ans_array": {"name": "q1_ans_array", "group": "Ungrouped variables", "definition": "[false, false, false, true, true]", "description": "", "templateType": "anything", "can_override": false}, "q1_expr": {"name": "q1_expr", "group": "Ungrouped variables", "definition": "latex(q1_expr_array[q1_idx])", "description": "", "templateType": "anything", "can_override": false}, "q1_idx": {"name": "q1_idx", "group": "Ungrouped variables", "definition": "random(0..4)", "description": "", "templateType": "anything", "can_override": false}, "q1_ans": {"name": "q1_ans", "group": "Ungrouped variables", "definition": "q1_ans_array[q1_idx]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["q1_expr_array", "letter", "q1_ans_array", "q1_expr", "q1_idx", "q1_ans"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "yes-no", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correct_answer_expr": "{q1_ans}"}}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}