// Numbas version: exam_results_page_options {"name": "Arbitrary constant of integration", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"css": "", "js": ""}, "functions": {}, "variables": {}, "metadata": {"description": "

The student must perform an indefinite integration, and include a constant of integration.

A custom marking algorithm identifies the name of the student's constant of integration, and replaces it with 'c' before comparing with the expected answer.

If the student enters something like '2c' instead of 'c', it'll be marked wrong, which is an error in the marking.

", "licence": "Creative Commons Attribution 4.0 International"}, "name": "Arbitrary constant of integration", "rulesets": {}, "ungrouped_variables": [], "variable_groups": [], "tags": [], "statement": "", "advice": "", "parts": [{"variableReplacementStrategy": "originalfirst", "checkingType": "absdiff", "checkingAccuracy": 0.001, "useCustomName": false, "customMarkingAlgorithm": "free_variables:\n set(findvars(studentExpr)) - set(\"x\")\n\nstudent_constant (The student's constant of integration):\n switch(\n len(free_variables)=0,\n fail(\"You might have forgotten to add a constant of integration.\")\n , len(free_variables)=1,\n free_variables[0]\n , \n fail(\"Your answer has too many free variables\")\n )\n\nstudentCompare:\n replace(student_constant,\"c\",studentExpr)", "checkVariableNames": false, "extendBaseMarkingAlgorithm": true, "vsetRangePoints": 5, "variableReplacements": [], "showFeedbackIcon": true, "answer": "x^2+c", "marks": 1, "scripts": {}, "showCorrectAnswer": true, "failureRate": 1, "vsetRange": [0, 1], "unitTests": [], "valuegenerators": [{"name": "c", "value": ""}, {"name": "x", "value": ""}], "customName": "", "prompt": "

$\\int x \\, \\mathrm{d}x =$

", "showPreview": true, "type": "jme"}], "extensions": [], "variablesTest": {"condition": "", "maxRuns": 100}, "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/"}]}