// Numbas version: exam_results_page_options {"name": "Expression is equivalent up to a constant factor", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Expression is equivalent up to a constant factor", "tags": [], "metadata": {"description": "

A custom marking algorithm for a JME part estabishes whether the student's answer is equivalent to the expected answer, up to an arbitrary constant factor.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "extensions": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": "100"}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "ratios:\n map(\n try(\n let(\n sval,unset(question_definitions,eval(studentCompare,vars)),\n cval,unset(question_definitions,eval(correctCompare,vars)),\n r,sval/cval\n ),\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\nratio_range: max(ratios) - min(ratios)\n\nnumericallyCorrect:\n apply(ratios);\n correctif( ratio_range < 10^-10\n , translate(\"part.jme.marking.correct\")\n , translate(\"part.marking.incorrect\")\n )", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Any answer of the form $C M R^2$, where $C$ is an arbitrary constant, will be accepted.

\n

Try:

\n", "answer": "M*R^2", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.001", "failureRate": "1", "vsetRangePoints": "5", "vsetRange": ["0", "1"], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "maxlength": {"length": "0", "partialCredit": "0", "message": ""}, "minlength": {"length": "0", "partialCredit": "0", "message": ""}, "valuegenerators": [{"name": "m", "value": ""}, {"name": "r", "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/"}]}