// Numbas version: exam_results_page_options {"name": "Merryn's copy of Decimals: Addition", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Merryn's copy of Decimals: Addition", "tags": [], "metadata": {"description": "
Decimals addition algorithm. 2 and 3 digit numbers. Carrying.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Write the following question down on paper and evaluate it without using a calculator.
\nIf you click on Show steps it will show you the full working using the standard method. Click on Try another question like this one to get a new set of numbers to add.
", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"chunsumlastdigit": {"name": "chunsumlastdigit", "group": "Ungrouped variables", "definition": "mod(chunsum,10)", "description": "", "templateType": "anything", "can_override": false}, "threedigit1": {"name": "threedigit1", "group": "Ungrouped variables", "definition": "cdigs[0]/1000+cdigs[1]/100+cdigs[2]/10", "description": "", "templateType": "anything", "can_override": false}, "cunitsum": {"name": "cunitsum", "group": "Ungrouped variables", "definition": "cdigs[0]+cdigs[3]", "description": "", "templateType": "anything", "can_override": false}, "ctencarry": {"name": "ctencarry", "group": "Ungrouped variables", "definition": "floor(ctensum/10)", "description": "", "templateType": "anything", "can_override": false}, "cunitsumlastdigit": {"name": "cunitsumlastdigit", "group": "Ungrouped variables", "definition": "mod(cunitsum,10)", "description": "", "templateType": "anything", "can_override": false}, "cunitcarry": {"name": "cunitcarry", "group": "Ungrouped variables", "definition": "floor(cunitsum/10)", "description": "", "templateType": "anything", "can_override": false}, "chunsum": {"name": "chunsum", "group": "Ungrouped variables", "definition": "ctencarry+cdigs[2]+cdigs[5]", "description": "", "templateType": "anything", "can_override": false}, "ctensum": {"name": "ctensum", "group": "Ungrouped variables", "definition": "cdigs[1]+cdigs[4]+cunitcarry", "description": "", "templateType": "anything", "can_override": false}, "threedigit2": {"name": "threedigit2", "group": "Ungrouped variables", "definition": "cdigs[3]/1000+cdigs[4]/100+cdigs[5]/10", "description": "", "templateType": "anything", "can_override": false}, "ctensumlastdigit": {"name": "ctensumlastdigit", "group": "Ungrouped variables", "definition": "mod(ctensum,10)", "description": "", "templateType": "anything", "can_override": false}, "chuncarry": {"name": "chuncarry", "group": "Ungrouped variables", "definition": "floor(chunsum/10)", "description": "", "templateType": "anything", "can_override": false}, "cans": {"name": "cans", "group": "Ungrouped variables", "definition": "threedigit1+threedigit2", "description": "", "templateType": "anything", "can_override": false}, "cdigs": {"name": "cdigs", "group": "Ungrouped variables", "definition": "[0]+shuffle(3..9)", "description": "", "templateType": "anything", "can_override": false}, "cunitsumtensdigit": {"name": "cunitsumtensdigit", "group": "Ungrouped variables", "definition": "0.1*(cunitsum-cunitsumlastdigit)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["cdigs", "threedigit1", "threedigit2", "cans", "cunitsum", "cunitsumlastdigit", "cunitcarry", "ctensum", "ctensumlastdigit", "ctencarry", "chunsum", "chunsumlastdigit", "chuncarry", "cunitsumtensdigit"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "$\\var{threedigit1}+\\var{threedigit2} = $ [[0]]
", "stepsPenalty": "1", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Generally, we set up $\\var{threedigit1}+\\var{threedigit2}$ with the decimal points lined up vertically so that the columns with the same place value are also lined up vertically:
\n$0$ | \n. | \n$\\var{cdigs[2]}$ | \n$\\var{cdigs[1]}$ | \n\n | $+$ | \n
$0$ | \n. | \n$\\var{cdigs[5]}$ | \n$\\var{cdigs[4]}$ | \n$\\var{cdigs[3]}$ | \n\n |
\n | \n | \n | $\\phantom{0}$ | \n\n | \n |
Note that we can pad out the decimal with zeros if we prefer:
\n$0$ | \n. | \n$\\var{cdigs[2]}$ | \n$\\var{cdigs[1]}$ | \n$\\color{red}{\\var{cdigs[0]}}$ | \n$+$ | \n
$0$ | \n. | \n$\\var{cdigs[5]}$ | \n$\\var{cdigs[4]}$ | \n$\\var{cdigs[3]}$ | \n\n |
\n | \n | \n | $\\phantom{0}$ | \n\n | \n |
Now we add the digits in the column to the far right (in this case, the thousandths column).
\nThis results in $\\var{cunitsum}$ and so we place $\\var{cunitsumlastdigit}$ under the line in this column.
\nThis results in $\\var{cunitsum}$ and so we place $\\var{cunitsumlastdigit}$ under the line in this column and carry the $1$ into the next column to the left.
\n$\\overset{\\phantom{1}}{0}$ | \n. | \n$\\overset{\\phantom{1}}{\\var{cdigs[2]}}$ | \n$\\overset{\\color{red}1}{\\var{cdigs[1]}}$ $\\overset{\\phantom{0}}{\\var{cdigs[1]}}$ | \n$\\color{green}{\\overset{\\phantom{1}}{\\var{cdigs[0]}}}$ | \n$+$ | \n
$0$ | \n. | \n$\\var{cdigs[5]}$ | \n$\\var{cdigs[4]}$ | \n$\\color{green}{\\var{cdigs[3]}}$ | \n\n |
\n | \n | \n | \n | $\\color{red}{\\var{cunitSumLastDigit}}$ | \n\n |
Now we add the digits in the next column to the left (in this case, the hundredths column).
\nThis results in $\\var{ctenSum}$ and so we place $\\var{ctenSumlastdigit}$ under the line in this column.
\nThis results in $\\var{ctenSum}$ and so we place $\\var{ctenSumlastdigit}$ under the line in this column and carry the $1$ into the next column to the left.
\n$\\overset{\\phantom{1}}{0}$ | \n. | \n$\\overset{\\color{red}{1}}{\\var{cdigs[2]}}$ $\\overset{\\phantom{1}}{\\var{cdigs[2]}}$ | \n$\\color{green}{\\overset{1}{\\var{cdigs[1]}}}$ $\\color{green}{\\overset{\\phantom{0}}{\\var{cdigs[1]}}}$ | \n$\\overset{\\phantom{1}}{\\var{cdigs[0]}}$ | \n$+$ | \n
$0$ | \n. | \n$\\var{cdigs[5]}$ | \n$\\color{green}{\\var{cdigs[4]}}$ | \n$\\var{cdigs[3]}$ | \n\n |
\n | \n | \n | $\\color{red}{\\var{ctenSumlastdigit}}$ | \n${\\var{cunitSumLastDigit}}$ | \n\n |
Now we add the digits in the next column to the left (in this case, the tenths column).
\nThis is $\\var{chunsum}$ so we place $\\var{chunsum}$ under the line in this column.
\nThis is $\\var{chunsum}$ so we place $\\var{chunsumlastdigit}$ under the line in this column and carry $\\var{chuncarry}$ into the next column to the left (which in this case is the ones column on the other side of the decimal point).
\n$\\overset{\\color{red}1}{0}$ $\\overset{\\phantom{1}}{0}$ | \n. | \n$\\color{green}{\\overset{1}{\\var{cdigs[2]}}}$ $\\color{green}{\\overset{\\phantom{1}}{\\var{cdigs[2]}}}$ | \n$\\overset{1}{\\var{cdigs[1]}}$ $\\overset{\\phantom{0}}{\\var{cdigs[1]}}$ | \n$\\overset{\\phantom{1}}{\\var{cdigs[0]}}$ | \n$+$ | \n
$0$ | \n. | \n$\\color{green}{\\var{cdigs[5]}}$ | \n$\\var{cdigs[4]}$ | \n$\\var{cdigs[3]}$ | \n\n |
\n | . | \n$\\color{red}{\\var{chunsumlastdigit}}$ | \n$\\var{ctenSumlastdigit}$ | \n${\\var{cunitSumLastDigit}}$ | \n\n |
Now we add the digits in the next column to the left (in this case, the ones column).
\nThis is just $0$ so we place $0$ under the line in this column.
\nThis is just $\\var{chuncarry}$ so we place $\\var{chuncarry}$ under the line in this column.
\n$\\color{green}{\\overset{1}{0}}$ $\\color{green}{\\overset{\\phantom{1}}{0}}$ | \n. | \n$\\overset{1}{\\var{cdigs[2]}}$ $\\overset{\\phantom{1}}{\\var{cdigs[2]}}$ | \n$\\overset{1}{\\var{cdigs[1]}}$ $\\overset{\\phantom{0}}{\\var{cdigs[1]}}$ | \n$\\overset{\\phantom{1}}{\\var{cdigs[0]}}$ | \n$+$ | \n
$\\color{green}{0}$ | \n. | \n$\\var{cdigs[5]}$ | \n$\\var{cdigs[4]}$ | \n$\\var{cdigs[3]}$ | \n\n |
$\\color{red}{\\var{chuncarry}}$ | \n. | \n$\\var{chunsumlastdigit}$ | \n$\\var{ctenSumlastdigit}$ | \n${\\var{cunitSumLastDigit}}$ | \n\n |
The answer is therefore $\\var{cans}$.
"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "cans", "maxValue": "cans", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}