// Numbas version: exam_results_page_options {"name": "Divisibility: 250", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"extensions": [], "rulesets": {}, "variable_groups": [], "name": "Divisibility: 250", "ungrouped_variables": ["seed", "twentyfiver", "num", "thismany", "d0", "d1", "d2"], "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.

Is this number divisible by 250? Half the time the number is, half the time it isn't. Steps give the divisibility test.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "functions": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "tags": [], "variables": {"d1": {"description": "", "definition": "mod(floor(num/10),10)", "group": "Ungrouped variables", "templateType": "anything", "name": "d1"}, "d0": {"description": "", "definition": "mod(num,10)", "group": "Ungrouped variables", "templateType": "anything", "name": "d0"}, "thismany": {"description": "", "definition": "num/250", "group": "Ungrouped variables", "templateType": "anything", "name": "thismany"}, "num": {"description": "", "definition": "if(seed=0, twentyfiver+random(1..249),twentyfiver)", "group": "Ungrouped variables", "templateType": "anything", "name": "num"}, "d2": {"description": "", "definition": "mod(floor(num/100),10)", "group": "Ungrouped variables", "templateType": "anything", "name": "d2"}, "twentyfiver": {"description": "", "definition": "random(750..10000#250)", "group": "Ungrouped variables", "templateType": "anything", "name": "twentyfiver"}, "seed": {"description": "", "definition": "random(0,1)", "group": "Ungrouped variables", "templateType": "anything", "name": "seed"}}, "parts": [{"stepsPenalty": "1", "marks": 0, "showCellAnswerState": true, "scripts": {}, "shuffleChoices": false, "minMarks": 0, "showCorrectAnswer": true, "distractors": ["", ""], "type": "1_n_2", "displayColumns": 0, "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "showFeedbackIcon": true, "steps": [{"showCorrectAnswer": true, "variableReplacements": [], "type": "information", "scripts": {}, "unitTests": [], "customMarkingAlgorithm": "", "prompt": "

A numbers is divisible by $250$ if and only if it ends with the digits $000, \\, 250,\\, 500$ or $750$.

\n

Since $\\var{num}$ ends with the digits $\\var{d2}\\var{d1}\\var{d0}$ it is NOT divisible by $250$.

\n

Since $\\var{num}$ ends with the digits $\\var{d2}\\var{d1}\\var{d0}$ it is divisible by $250$.

\n

To work out how many $250$s are in a number we could just count up by $250$s or you could cross off the last zero (i.e. divide by $10$) and then divide by $25$, that is, double the number, double it again, and then cross off the last two zero digits (this works because multiplying by $4$ and then dividing by $100$ is equivalent to dividing by $25$).

\n

For instance, crossing off the last digit of $\\var{num}$ gives $\\var{num/10}$. Then this doubles to give $\\var{2*num/10}$, doubling again gives $\\var{4*num/10}$ so we can cross of the last two zeros and conclude there are $\\var{thismany}$ two-hundred and fifties in $\\var{num}$. In other words, $\\frac{\\var{num}}{250}=\\var{thismany}$.

\n

\n

", "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true}], "prompt": "

Is $\\var{num}$ divisible by $250$?

", "extendBaseMarkingAlgorithm": true, "matrix": ["seed", "1-seed"], "choices": ["Yes", "No"], "variableReplacements": [], "unitTests": [], "customMarkingAlgorithm": "", "maxMarks": 0}], "preamble": {"css": "", "js": ""}, "advice": "", "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/"}]}