// Numbas version: exam_results_page_options {"name": "Deirdre's copy of Ask for significand and exponent of a number in scientific notation separately", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"statement": "

This question shows how to ask for a number in scientific notation, by asking for the significand and exponent separately.

", "name": "Deirdre's copy of Ask for significand and exponent of a number in scientific notation separately", "variable_groups": [], "tags": [], "parts": [{"gaps": [{"notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "type": "numberentry", "correctAnswerStyle": "plain", "allowFractions": false, "marks": 1, "mustBeReducedPC": 0, "scripts": {}, "minValue": "significand", "variableReplacements": [], "unitTests": [], "maxValue": "significand", "customMarkingAlgorithm": "", "mustBeReduced": false, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true}, {"notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "type": "numberentry", "correctAnswerStyle": "plain", "allowFractions": false, "marks": 1, "mustBeReducedPC": 0, "scripts": {}, "minValue": "exponent", "variableReplacements": [], "unitTests": [], "maxValue": "exponent", "customMarkingAlgorithm": "", "mustBeReduced": false, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true}], "type": "gapfill", "marks": 0, "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "unitTests": [], "customMarkingAlgorithm": "student_significand (The significand as the student entered it):\n parsenumber(studentanswer[0],\"en\")\n\nsignificand_size (If student's significand is written a*10^n, 1<=a<10, this is n):\n floor(log(abs(student_significand)))\n\nwrong_significand_size (Take away marks if significand is not in range 1..10):\n assert(significand_size=0,\n multiply_credit(0.5,\"Your significand is not at least 1 and less than 10.\")\n )\n\nstudent_exponent (The exponent as the student wrote it):\n parsenumber(studentanswer[1],\"en\")\n\nadjusted_exponent (The exponent of the student's number, taking into account the size of their significand): \n student_exponent + significand_size\n\nadjusted_significand (The student's significand, scaled into the range 1..10):\n student_significand/(10^significand_size)\n\nsignificand_feedback (Feedback on the adjusted significand: mark gap 0):\n feedback(\"Significand:\");\n let(result,apply_marking_script(\"numberentry\",string(adjusted_significand), gaps[0][\"settings\"],gaps[0][\"marks\"]),\n concat_feedback(result[\"mark\"][\"feedback\"],0.5)\n )\n\nexponent_feedback (Feedback on the adjusted exponent: mark gap 1):\n feedback(\"Exponent:\");\n let(result,apply_marking_script(\"numberentry\",string(adjusted_exponent), gaps[1][\"settings\"],gaps[1][\"marks\"]),\n concat_feedback(result[\"mark\"][\"feedback\"],0.5)\n )\n \n\n\nmark:\n apply(significand_feedback);\n apply(exponent_feedback);\n apply(wrong_significand_size)\n\ninterpreted_answer: [adjusted_significand, adjusted_exponent]", "sortAnswers": false, "showFeedbackIcon": true, "prompt": "

Write $ \\var{significand} \\times 10^\\var{exponent}$.

\n

[[0]] $\\times 10$ [[1]]

", "extendBaseMarkingAlgorithm": false, "variableReplacementStrategy": "originalfirst"}], "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["significand", "exponent"], "rulesets": {}, "advice": "", "preamble": {"css": "", "js": ""}, "extensions": [], "functions": {}, "variables": {"significand": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "significand", "definition": "random(1..10#0.001 except 10)*random(-1,1)"}, "exponent": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "exponent", "definition": "random(-100..100 except 0)"}}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

This question shows how to ask for a number in scientific notation, by asking for the significand and exponent separately and using a custom marking algorithm in the gap-fill part to put the two pieces together.

\n

Answers not in standard form, i.e. with a significand not in $[1,10)$, are accepted but given partial marks.

"}, "type": "question", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Deirdre Casey", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/681/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Deirdre Casey", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/681/"}]}