// 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.

\n

If 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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$0$.$\\var{cdigs[2]}$$\\var{cdigs[1]}$$+$
$0$.$\\var{cdigs[5]}$$\\var{cdigs[4]}$$\\var{cdigs[3]}$
$\\phantom{0}$
\n

\n

Note that we can pad out the decimal with zeros if we prefer:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$0$.$\\var{cdigs[2]}$$\\var{cdigs[1]}$$\\color{red}{\\var{cdigs[0]}}$$+$
$0$.$\\var{cdigs[5]}$$\\var{cdigs[4]}$$\\var{cdigs[3]}$
$\\phantom{0}$
\n

\n

Now we add the digits in the column to the far right (in this case, the thousandths column).

\n

This results in $\\var{cunitsum}$ and so we place $\\var{cunitsumlastdigit}$ under the line in this column.

\n

This 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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\overset{\\phantom{1}}{0}$.$\\overset{\\phantom{1}}{\\var{cdigs[2]}}$$\\overset{\\color{red}1}{\\var{cdigs[1]}}$ $\\overset{\\phantom{0}}{\\var{cdigs[1]}}$$\\color{green}{\\overset{\\phantom{1}}{\\var{cdigs[0]}}}$$+$
$0$.$\\var{cdigs[5]}$$\\var{cdigs[4]}$$\\color{green}{\\var{cdigs[3]}}$
$\\color{red}{\\var{cunitSumLastDigit}}$
\n

\n

Now we add the digits in the next column to the left (in this case, the hundredths column).

\n

This results in $\\var{ctenSum}$ and so we place $\\var{ctenSumlastdigit}$ under the line in this column.

\n

This 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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\overset{\\phantom{1}}{0}$.$\\overset{\\color{red}{1}}{\\var{cdigs[2]}}$ $\\overset{\\phantom{1}}{\\var{cdigs[2]}}$$\\color{green}{\\overset{1}{\\var{cdigs[1]}}}$ $\\color{green}{\\overset{\\phantom{0}}{\\var{cdigs[1]}}}$$\\overset{\\phantom{1}}{\\var{cdigs[0]}}$$+$
$0$.$\\var{cdigs[5]}$$\\color{green}{\\var{cdigs[4]}}$$\\var{cdigs[3]}$
$\\color{red}{\\var{ctenSumlastdigit}}$${\\var{cunitSumLastDigit}}$
\n

\n

\n

Now we add the digits in the next column to the left (in this case, the tenths column).

\n

This is $\\var{chunsum}$ so we place $\\var{chunsum}$ under the line in this column.

\n

This 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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\overset{\\color{red}1}{0}$ $\\overset{\\phantom{1}}{0}$.$\\color{green}{\\overset{1}{\\var{cdigs[2]}}}$ $\\color{green}{\\overset{\\phantom{1}}{\\var{cdigs[2]}}}$$\\overset{1}{\\var{cdigs[1]}}$ $\\overset{\\phantom{0}}{\\var{cdigs[1]}}$$\\overset{\\phantom{1}}{\\var{cdigs[0]}}$$+$
$0$.$\\color{green}{\\var{cdigs[5]}}$$\\var{cdigs[4]}$$\\var{cdigs[3]}$
.$\\color{red}{\\var{chunsumlastdigit}}$$\\var{ctenSumlastdigit}$${\\var{cunitSumLastDigit}}$
\n

\n

Now we add the digits in the next column to the left (in this case, the ones column).

\n

This is just $0$ so we place $0$ under the line in this column.

\n

This is just $\\var{chuncarry}$ so we place $\\var{chuncarry}$ under the line in this column.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\color{green}{\\overset{1}{0}}$ $\\color{green}{\\overset{\\phantom{1}}{0}}$.$\\overset{1}{\\var{cdigs[2]}}$ $\\overset{\\phantom{1}}{\\var{cdigs[2]}}$$\\overset{1}{\\var{cdigs[1]}}$ $\\overset{\\phantom{0}}{\\var{cdigs[1]}}$$\\overset{\\phantom{1}}{\\var{cdigs[0]}}$$+$
$\\color{green}{0}$.$\\var{cdigs[5]}$$\\var{cdigs[4]}$$\\var{cdigs[3]}$
$\\color{red}{\\var{chuncarry}}$.$\\var{chunsumlastdigit}$$\\var{ctenSumlastdigit}$${\\var{cunitSumLastDigit}}$
\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/"}]}