// Numbas version: finer_feedback_settings {"name": "Divisibility: 5", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"fiver": {"name": "fiver", "definition": "random(300..2000#5)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "thismany": {"name": "thismany", "definition": "num/5", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "seed": {"name": "seed", "definition": "random(0,1)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "num": {"name": "num", "definition": "if(seed=0, fiver+random(1..4),fiver)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}}, "preamble": {"css": "", "js": ""}, "functions": {}, "advice": "", "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["seed", "fiver", "num", "thismany"], "variable_groups": [], "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "
Is this number divisible by 5? Half the time the number is, half the time it isn't. Steps give the divisibility test and a way to determine the number of fives.
"}, "name": "Divisibility: 5", "tags": [], "rulesets": {}, "parts": [{"maxMarks": 0, "shuffleChoices": false, "showFeedbackIcon": true, "unitTests": [], "minMarks": 0, "type": "1_n_2", "matrix": ["seed", "1-seed"], "stepsPenalty": "1", "showCorrectAnswer": true, "variableReplacements": [], "prompt": "Is $\\var{num}$ divisible by $5$?
", "distractors": ["", ""], "extendBaseMarkingAlgorithm": true, "steps": [{"prompt": "A number is divisible by $5$ if and only if it ends in the digit $0$ or the digit $5$.
\nSince $\\var{num}$ ends with the digit $\\var{mod(num,10)}$ it is NOT divisible by $5$.
\nSince $\\var{num}$ ends with the digit $\\var{mod(num,10)}$ it is divisible by $5$.
\nTo work out how many fives are in a number, you can double the number and then cross off the end zero digit (this works because multiplying by $2$ and then dividing by $10$ is equivalent to dividing by $5$).
\nFor instance, $\\var{num}$ doubles to give $\\var{2*num}$ so we can cross of the zero and conclude there are $\\var{thismany}$ fives in $\\var{num}$. In other words, $\\frac{\\var{num}}{5}=\\var{thismany}$.
\n\n", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "unitTests": [], "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 0, "scripts": {}, "type": "information"}], "variableReplacementStrategy": "originalfirst", "scripts": {}, "customMarkingAlgorithm": "", "showCellAnswerState": true, "choices": ["Yes", "No"], "displayType": "radiogroup", "marks": 0, "displayColumns": 0}], "extensions": [], "statement": "If you are unsure of how to do a question, click on Show steps to see the full working. Then, once you understand how to do the question, click on Try another question like this one to start again.
", "type": "question", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}