// Numbas version: exam_results_page_options {"name": "HELM Book 1.2.3 exercises", "metadata": {"description": "

HELM Book 1.2.3 exercises

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", ""], "variable_overrides": [[], [], []], "questions": [{"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}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "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": {}, "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"}, {"name": "1.2.3.2 What type of polynomial is this?", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Is this polynomial a quadratic, linear or constant? Part of HELM Book 1.2

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

What type of polynomial is $\\var{q2_expr}$?

", "advice": "

$\\var{q2_expr}$

\n

There are no variables in this expression, so this is a constant.

\n

The highest degree is 1, so this is a linear expression.

\n

The highest degree is 2, so this is a quadratic expression.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"weighted_random_list": {"name": "weighted_random_list", "group": "Ungrouped variables", "definition": "[[0,10],[1,1],[2,1],[3,1],[4,1],[5,1],[6,1],[7,1],[8,1],[9,1]]", "description": "", "templateType": "anything", "can_override": false}, "q2_quadratic": {"name": "q2_quadratic", "group": "Ungrouped variables", "definition": "weighted_random(weighted_random_list)", "description": "", "templateType": "anything", "can_override": false}, "q2_linear": {"name": "q2_linear", "group": "Ungrouped variables", "definition": "weighted_random(weighted_random_list)", "description": "", "templateType": "anything", "can_override": false}, "q2_constant": {"name": "q2_constant", "group": "Ungrouped variables", "definition": "random(0..9 except q2_quadratic)", "description": "", "templateType": "anything", "can_override": false}, "q2_expr": {"name": "q2_expr", "group": "Ungrouped variables", "definition": "simplify(expression(\n q2_expr_parts[0] + q2_sgn1 + q2_expr_parts[1] + q2_sgn2 + q2_expr_parts[2]),\n [\"basic\",\"unitFactor\",\"unitPower\",\"zeroFactor\",\"zeroTerm\"])", "description": "", "templateType": "anything", "can_override": false}, "q2_expr_parts": {"name": "q2_expr_parts", "group": "Ungrouped variables", "definition": "shuffle([q2_quadratic + letter + \"^2\",\n q2_linear + letter,\n q2_constant\n ])", "description": "", "templateType": "anything", "can_override": false}, "q2_sgn1": {"name": "q2_sgn1", "group": "Ungrouped variables", "definition": "random(\"+\",\"-\")", "description": "", "templateType": "anything", "can_override": false}, "q2_sgn2": {"name": "q2_sgn2", "group": "Ungrouped variables", "definition": "random(\"+\",\"-\")", "description": "", "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}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["weighted_random_list", "q2_quadratic", "q2_linear", "q2_constant", "q2_expr", "q2_expr_parts", "q2_sgn1", "q2_sgn2", "letter"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_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, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["constant", "linear", "quadratic"], "matrix": ["if(q2_quadratic=0 and q2_linear=0,1,0)", "if(q2_quadratic=0 and q2_linear<>0,1,0)", "if(q2_quadratic<>0,1,0)"], "distractors": ["", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "1.2.3.3 What is the degree of this polynomial?", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Given an arbitrary polynomial, identify its degree. Part of HELM Book 1.2

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

What is the degree of the polynomial  $\\var{q3_expr}$?

", "advice": "

Look for the largest index on the variable. This is the degree.

\n

If there are no indices, look for a variable. If there is a variable with no index, then this could be rewritten with an index of 1, and this is the degree.

\n

If there is no variable, and only a constant, then the degree is $0$.

\n

So the degree of $\\var{q3_expr}$ is $\\var{q3_deg}$.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"q3_expr": {"name": "q3_expr", "group": "Ungrouped variables", "definition": "simplify(expression(string(simplify(\nexpression( \n q3_expr_bits[0] + \"+\" + q3_expr_bits[1] + \"+\" + q3_expr_bits[2] + \"+\" +\n q3_expr_bits[3] + \"+\" + q3_expr_bits[4] + \"+\" + q3_expr_bits[5] + \"+\" +\n q3_expr_bits[6] + \"+\" + q3_expr_bits[7] + \"+\" + q3_expr_bits[8] + \"+\" +\n q3_expr_bits[9] ),\n[\"all\"]))),[\"all\"])", "description": "", "templateType": "anything", "can_override": false}, "q3_expr_bits": {"name": "q3_expr_bits", "group": "Ungrouped variables", "definition": "shuffle([q3_coeffs[0] + letter + \"^9\",\n q3_coeffs[1] + letter + \"^8\" , \n q3_coeffs[2] + letter + \"^7\" , \n q3_coeffs[3] + letter + \"^6\" , \n q3_coeffs[4] + letter + \"^5\" , \n q3_coeffs[5] + letter + \"^4\" , \n q3_coeffs[6] + letter + \"^3\" , \n q3_coeffs[7] + letter + \"^2\" , \n q3_coeffs[8] + letter , \n q3_coeffs[9] \n ])", "description": "", "templateType": "anything", "can_override": false}, "q3_deg": {"name": "q3_deg", "group": "Ungrouped variables", "definition": "if(q3_coeffs[0]<>0,9,\n if(q3_coeffs[1]<>0,8,\n if(q3_coeffs[2]<>0,7,\n if(q3_coeffs[3]<>0,6,\n if(q3_coeffs[4]<>0,5,\n if(q3_coeffs[5]<>0,4,\n if(q3_coeffs[6]<>0,3,\n if(q3_coeffs[7]<>0,2,\n if(q3_coeffs[8]<>0,1,0\n )))))))))", "description": "", "templateType": "anything", "can_override": false}, "q3_coeffs": {"name": "q3_coeffs", "group": "Ungrouped variables", "definition": "[weighted_random([[0,4],[1,1]]) * random(-9..9),\n weighted_random([[0,4],[1,1]]) * random(-9..9),\n weighted_random([[0,4],[1,1]]) * random(-9..9),\n weighted_random([[0,3],[1,1]]) * random(-9..9),\n weighted_random([[0,3],[1,1]]) * random(-9..9),\n weighted_random([[0,3],[1,1]]) * random(-9..9),\n weighted_random([[0,2],[1,1]]) * random(-9..9),\n weighted_random([[0,2],[1,1]]) * random(-9..9),\n weighted_random([[0,2],[1,1]]) * random(-9..9),\n random(-9..9)\n ]", "description": "", "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}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["q3_expr", "q3_expr_bits", "q3_deg", "q3_coeffs", "letter"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "q3_deg", "maxValue": "q3_deg", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "menu", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": "", "allowAttemptDownload": false, "downloadEncryptionKey": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "

Work through these practice questions. You are encouraged to try each question multiple times as the expressions in each question will change each time you try it.

", "end_message": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "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": []}