// Numbas version: exam_results_page_options {"name": "Applied modulo arithmetic: minutes on the clock", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"showFeedbackIcon": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "type": "gapfill", "prompt": "

The number $\\var{day1}$ is displayed as the minutes on a digital clock. $\\var{offset}$ minutes later, the minutes displayed will be [[0]].

\n

", "gaps": [{"mustBeReduced": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "minValue": "{day2}", "allowFractions": false, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "maxValue": "{day2}", "marks": "1", "variableReplacements": []}], "marks": 0, "variableReplacements": []}], "name": "Applied modulo arithmetic: minutes on the clock", "functions": {}, "variables": {"modoffset": {"definition": "mod(offset,60)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "modoffset"}, "day1": {"definition": "dayList[day1number]", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "day1"}, "offset": {"definition": "random(100..1000)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "offset"}, "event": {"definition": "random('appointment', 'doctors appointment', 'dentist appointment', 'TV show', 'work shift')", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "event"}, "name1": {"definition": "nameList[0]", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "name1"}, "nameList": {"definition": "shuffle(['Ben','Annie', 'Clinton', 'Annette', 'Jill', 'David', 'Fran', 'Andrew', 'Keith', 'Abbey', 'Sophie', 'John', 'Simon', 'Klee', 'Daniel', 'Jason', 'Tom', 'Matt', 'Stephan','Elizabeth'])", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "nameList"}, "name2": {"definition": "nameList[1]", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "name2"}, "day1number": {"definition": "random(0..59)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "day1number"}, "dayList": {"definition": "list(0..59)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "dayList"}, "day2number": {"definition": "mod(day1number+offset,60)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "day2number"}, "day2": {"definition": "dayList[day2number]", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "day2"}}, "advice": "

There are $60$ minutes in an hour (note the minutes display can show '00' up to '59') so to do a question such as the above we should work modulo $60$.

\n

Since $\\var{offset}\\div 60=\\var{floor(offset/60)}$$\\frac{\\var{modoffset}}{60}$, when it comes to the minutes display, '$\\var{offset}$ minutes later' is the same as '$\\var{modoffset}$ minutes later'.

\n

Since we started at {day1} minutes, $\\var{modoffset}$ minutes later is {day2} minutes.

", "statement": "

Modulo arithmetic can help in situations where a finite number of cases is continually cycled through. 

", "ungrouped_variables": ["offset", "dayList", "day1number", "day1", "day2number", "day2", "nameList", "name1", "name2", "event", "modoffset"], "extensions": [], "tags": [], "variable_groups": [], "rulesets": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "

Applied questions that could be done with modulo arithmetic.

"}, "preamble": {"js": "", "css": ""}, "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/"}]}