// Numbas version: exam_results_page_options {"name": "Gordon's copy of 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": [{"tags": [], "rulesets": {}, "advice": "", "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.

"}, "extensions": [], "variables": {"exponent": {"group": "Ungrouped variables", "templateType": "anything", "name": "exponent", "description": "", "definition": "random(-100..100 except 0)"}, "significand": {"group": "Ungrouped variables", "templateType": "anything", "name": "significand", "description": "", "definition": "random(1..10#0.001 except 10)*random(-1,1)"}}, "parts": [{"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]", "showFeedbackIcon": true, "marks": 0, "showCorrectAnswer": true, "scripts": {}, "gaps": [{"minValue": "significand", "mustBeReducedPC": 0, "mustBeReduced": false, "marks": 1, "showCorrectAnswer": true, "scripts": {}, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "maxValue": "significand", "correctAnswerFraction": false, "unitTests": [], "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "allowFractions": false, "type": "numberentry", "correctAnswerStyle": "plain"}, {"minValue": "exponent", "mustBeReducedPC": 0, "mustBeReduced": false, "marks": 1, "showCorrectAnswer": true, "scripts": {}, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "maxValue": "exponent", "correctAnswerFraction": false, "unitTests": [], "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "allowFractions": false, "type": "numberentry", "correctAnswerStyle": "plain"}], "variableReplacementStrategy": "originalfirst", "unitTests": [], "variableReplacements": [], "sortAnswers": false, "type": "gapfill", "extendBaseMarkingAlgorithm": false, "prompt": "

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

\n

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

"}], "preamble": {"js": "", "css": ""}, "functions": {}, "name": "Gordon's copy of Deirdre's copy of Ask for significand and exponent of a number in scientific notation separately", "variable_groups": [], "ungrouped_variables": ["significand", "exponent"], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "statement": "

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

", "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/"}, {"name": "Gordon Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3304/"}]}]}], "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/"}, {"name": "Gordon Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3304/"}]}