// Numbas version: exam_results_page_options {"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}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "1.2.3.3 What is the degree of this polynomial?", "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": {}, "extensions": [], "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", "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/"}]}