// Numbas version: exam_results_page_options {"name": "Harry's copy of Johan's copy of Scientific notation: large numbers to scientific notation", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"js": "", "css": ""}, "statement": "

Write the following numbers in scientific notation.

", "variables": {"dec1": {"name": "dec1", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1.1..9.9#0.01)", "description": ""}, "q2": {"name": "q2", "group": "Ungrouped variables", "templateType": "anything", "definition": "precround(dec2*10^pow2,0)", "description": ""}, "pow1": {"name": "pow1", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..6)", "description": ""}, "dec2": {"name": "dec2", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1.1..9.9#0.001)", "description": ""}, "pow2": {"name": "pow2", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(4..8)", "description": ""}, "q1": {"name": "q1", "group": "Ungrouped variables", "templateType": "anything", "definition": "precround(dec1*10^pow1,0)", "description": ""}}, "name": "Harry's copy of Johan's copy of Scientific notation: large numbers to scientific notation", "rulesets": {}, "metadata": {"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'

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": ""}, "functions": {"spacenumber": {"parameters": [["n", "number"]], "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] : \"\");", "type": "string", "language": "javascript"}}, "advice": "", "variablesTest": {"condition": "", "maxRuns": 100}, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "ungrouped_variables": ["dec1", "pow1", "q1", "dec2", "pow2", "q2"], "parts": [{"marks": 0, "scripts": {}, "gaps": [{"minValue": "{dec1}", "marks": 1, "scripts": {}, "correctAnswerFraction": false, "showCorrectAnswer": false, "maxValue": "{dec1}", "type": "numberentry", "variableReplacements": [], "showPrecisionHint": false, "variableReplacementStrategy": "originalfirst", "allowFractions": false}, {"minValue": "{pow1}", "marks": 1, "scripts": {}, "correctAnswerFraction": false, "showCorrectAnswer": false, "maxValue": "{pow1}", "type": "numberentry", "variableReplacements": [], "showPrecisionHint": false, "variableReplacementStrategy": "originalfirst", "allowFractions": false}], "showCorrectAnswer": true, "prompt": "

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

", "type": "gapfill", "variableReplacements": [], "stepsPenalty": "1", "variableReplacementStrategy": "originalfirst", "steps": [{"marks": 0, "scripts": {}, "showCorrectAnswer": true, "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$

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

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

", "type": "gapfill", "variableReplacements": [], "stepsPenalty": "1", "variableReplacementStrategy": "originalfirst", "steps": [{"marks": 0, "scripts": {}, "showCorrectAnswer": true, "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$

", "type": "information", "variableReplacements": [], "variableReplacementStrategy": "originalfirst"}]}], "showQuestionGroupNames": false, "type": "question", "variable_groups": [], "tags": ["converting", "scientific notation", "standard form"], "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/"}]}