// 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.
\nTry:
\nM*R^2
700*M*R^2
(1/2)*M*R^2