// 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": [{"metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "

Applied questions that could be done with modulo arithmetic.

"}, "type": "question", "preamble": {"css": "", "js": ""}, "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.

", "rulesets": {}, "variable_groups": [], "functions": {}, "ungrouped_variables": ["offset", "dayList", "day1number", "day1", "day2number", "day2", "nameList", "name1", "name2", "event", "modoffset"], "name": "Applied modulo arithmetic: minutes on the clock", "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "extensions": [], "variables": {"event": {"name": "event", "definition": "random('appointment', 'doctors appointment', 'dentist appointment', 'TV show', 'work shift')", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "name1": {"name": "name1", "definition": "nameList[0]", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "day1number": {"name": "day1number", "definition": "random(0..59)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "offset": {"name": "offset", "definition": "random(100..1000)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "name2": {"name": "name2", "definition": "nameList[1]", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "day2": {"name": "day2", "definition": "dayList[day2number]", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "day2number": {"name": "day2number", "definition": "mod(day1number+offset,60)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "dayList": {"name": "dayList", "definition": "list(0..59)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "nameList": {"name": "nameList", "definition": "shuffle(['Ben','Annie', 'Clinton', 'Annette', 'Jill', 'David', 'Fran', 'Andrew', 'Keith', 'Abbey', 'Sophie', 'John', 'Simon', 'Klee', 'Daniel', 'Jason', 'Tom', 'Matt', 'Stephan','Elizabeth'])", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "day1": {"name": "day1", "definition": "dayList[day1number]", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "modoffset": {"name": "modoffset", "definition": "mod(offset,60)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}}, "statement": "

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

", "parts": [{"type": "gapfill", "scripts": {}, "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "showCorrectAnswer": true, "gaps": [{"maxValue": "{day2}", "mustBeReduced": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": "1", "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "{day2}", "showCorrectAnswer": true, "correctAnswerFraction": false, "variableReplacements": [], "allowFractions": false}], "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

", "variableReplacements": []}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}