// Numbas version: exam_results_page_options {"name": "Mark the logarithm of a negative number: correct if a multiple of $2\\pi i$ different from the expected answer", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Mark the logarithm of a negative number: correct if a multiple of $2\\pi i$ different from the expected answer", "tags": [], "metadata": {"description": "

The expected answer involves the logarithm of a negative number, which doesn't have a unique solution.

\n

The part's marking algorithm checks that the student's answer differs from the expected answer by a multiple of $2\\pi$.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "agree (Do the student's answer and the expected answer agree on each of the sets of variable values? True if their real parts are the same and their complex parts are a multiple of 2pi apart):\n apply(vset);\n map(\n try(\n scope_case_sensitive(let(\n expected_value, unset(question_definitions,eval(studentCompare,vars)),\n student_value, unset(question_definitions,eval(correctCompare,vars)),\n diff, expected_value - student_value,\n isclose(re(diff), 0, settings[\"checkingAccuracy\"]) and isclose(im(diff), tonearest(im(diff),2pi), settings[\"checkingAccuracy\"])\n ),settings[\"caseSensitive\"]),\n message,\n warn(translate(\"part.jme.answer invalid\",[\"message\":message]));\n fail(translate(\"part.jme.answer invalid\",[\"message\":message]));\n false\n ),\n vars,\n vset\n )\n", "extendBaseMarkingAlgorithm": true, "unitTests": [{"variables": [], "name": "ln(-1/(x+5)) is correct", "answer": {"valid": true, "value": "ln(-1/(x+5))"}, "notes": [{"name": "mark", "expected": {"value": "nothing", "messages": [{"op": "add_credit", "credit": 1, "message": "Your answer is numerically correct.\n\nYou were awarded 1 mark.", "reason": "correct", "credit_change": "positive"}], "warnings": [], "error": "", "valid": true, "credit": 1}}, {"name": "agree", "expected": {"value": "[ true, true, true, true, true ]", "messages": [], "warnings": [], "error": "", "valid": true, "credit": 1}}]}, {"variables": [], "name": "ln(-1/(-x-5)) is marked incorrect", "answer": {"valid": true, "value": "ln(-1/(-x-5))"}, "notes": [{"name": "mark", "expected": {"value": "nothing", "messages": [{"op": "add_credit", "credit": 0, "message": "Your answer is incorrect.", "reason": "incorrect", "credit_change": "negative"}], "warnings": [], "error": "", "valid": true, "credit": 0}}, {"name": "agree", "expected": {"value": "[ false, false, false, false, false ]", "messages": [], "warnings": [], "error": "", "valid": true, "credit": 0}}]}], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

The answer is $-\\ln(-x-5)$. Try writing $\\ln\\left(\\frac{-1}{-x-5}\\right)$.

", "answer": "-ln(-x-5)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}], "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/"}]}