// Numbas version: exam_results_page_options {"name": "Scientific notation 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "", "preamble": {"js": "", "css": ""}, "functions": {"spacenumber": {"definition": "var parts=n.toString().split(\".\");\n if(parts[1] && parts[1].length<2) {\n parts[1]+='0';\n }\n return parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \" \") + (parts[1] ? \", \" + parts[1] : \"\");", "parameters": [["n", "number"]], "type": "string", "language": "javascript"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

Write the following numbers in scientific notation.

", "ungrouped_variables": ["dec1", "pow1", "q1", "dec2", "pow2", "q2"], "variables": {"q1": {"definition": "precround(dec1*10^pow1,0)", "templateType": "anything", "name": "q1", "description": "", "group": "Ungrouped variables"}, "pow1": {"definition": "random(2..6)", "templateType": "anything", "name": "pow1", "description": "", "group": "Ungrouped variables"}, "dec2": {"definition": "random(1.1..9.9#0.001)", "templateType": "anything", "name": "dec2", "description": "", "group": "Ungrouped variables"}, "dec1": {"definition": "random(1.1..9.9#0.01)", "templateType": "anything", "name": "dec1", "description": "", "group": "Ungrouped variables"}, "pow2": {"definition": "random(4..8)", "templateType": "anything", "name": "pow2", "description": "", "group": "Ungrouped variables"}, "q2": {"definition": "precround(dec2*10^pow2,0)", "templateType": "anything", "name": "q2", "description": "", "group": "Ungrouped variables"}}, "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "", "notes": "

I tried pattern matching, I suck at javascript, I couldn't get it to check it was in the right form, nor check each part of the answer separately using something like 'm_all((m_all(??))*10^m_all(??))' or '(m_all(??));dec*10^m_all(??);power'

"}, "rulesets": {}, "type": "question", "variable_groups": [], "tags": ["converting", "scientific notation", "standard form"], "showQuestionGroupNames": false, "name": "Scientific notation 1", "question_groups": [{"pickQuestions": 0, "name": "", "pickingStrategy": "all-ordered", "questions": []}], "parts": [{"marks": 0, "showCorrectAnswer": true, "gaps": [{"marks": 1, "showCorrectAnswer": false, "type": "numberentry", "scripts": {}, "variableReplacements": [], "allowFractions": false, "correctAnswerFraction": false, "maxValue": "{dec1}", "variableReplacementStrategy": "originalfirst", "showPrecisionHint": false, "minValue": "{dec1}"}, {"marks": 1, "showCorrectAnswer": false, "type": "numberentry", "scripts": {}, "variableReplacements": [], "allowFractions": false, "correctAnswerFraction": false, "maxValue": "{pow1}", "variableReplacementStrategy": "originalfirst", "showPrecisionHint": false, "minValue": "{pow1}"}], "type": "gapfill", "scripts": {}, "stepsPenalty": "1", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"marks": 0, "showCorrectAnswer": true, "type": "information", "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "prompt": "

A number is in scientific notation if it is written as a decimal multiplied by some power of 10, where the decimal has exactly one digit in front of the decimal place. For example:

\n

\$1.234\\times 10^6, \\quad \\text{and} \\quad 3.01\\times 10^{-3}\$

\n

are both in scientific notation.

\n

\n
\n

Suppose we have the number $53\\,600\\,000$. In scientific notation, this number would start with $5.36$ since we only want one digit in front of the decimal point. So the decimal point was to the right of the last digit here $53\\,600\\,000$ and needs to move to between the $5$ and the $3$ here $5.36$. Count the places that the decimal point must jump between and you get $7$ places. That is,

\n

\n

\$53\\,600\\,000=5.36\\times 10^7\$

\n

\n

We have a positive seven as the power because we need to make the number $5.36$ bigger to get to $53\\,600\\,000$

"}], "prompt": "

{spacenumber(q1)} = [[0]]$\\times 10$ [[1]]

"}, {"marks": 0, "showCorrectAnswer": true, "gaps": [{"marks": 1, "showCorrectAnswer": false, "type": "numberentry", "scripts": {}, "variableReplacements": [], "allowFractions": false, "correctAnswerFraction": false, "maxValue": "{dec2}", "variableReplacementStrategy": "originalfirst", "showPrecisionHint": false, "minValue": "{dec2}"}, {"marks": 1, "showCorrectAnswer": false, "type": "numberentry", "scripts": {}, "variableReplacements": [], "allowFractions": false, "correctAnswerFraction": false, "maxValue": "{pow2}", "variableReplacementStrategy": "originalfirst", "showPrecisionHint": false, "minValue": "{pow2}"}], "type": "gapfill", "scripts": {}, "stepsPenalty": "1", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"marks": 0, "showCorrectAnswer": true, "type": "information", "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "prompt": "

A number is in scientific notation if it is written as a decimal multiplied by some power of 10, where the decimal has exactly one digit in front of the decimal place. For example:

\n

\$1.234\\times 10^6, \\quad \\text{and} \\quad 3.01\\times 10^{-3}\$

\n

are both in scientific notation.

\n

\n
\n

Suppose we have the number $53\\,600\\,000$. In scientific notation, this number would start with $5.36$ since we only want one digit in front of the decimal point. So the decimal point was to the right of the last digit here $53\\,600\\,000$ and needs to move to between the $5$ and the $3$ here $5.36$. Count the places that the decimal point must jump between and you get $7$ places. That is,

\n

\n

\$53\\,600\\,000=5.36\\times 10^7\$

\n

\n

We have a positive seven as the power because we need to make the number $5.36$ bigger to get to $53\\,600\\,000$

"}], "prompt": "

{spacenumber(q2)} = [[0]]$\\times 10$ [[1]]

"}], "contributors": [{"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}]}]}], "contributors": [{"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}]}