// Numbas version: exam_results_page_options {"name": "Applied modulo arithmetic: days of the week", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "functions": {}, "name": "Applied modulo arithmetic: days of the week", "advice": "

There are $7$ days in the week (and the order of the days in the week doesn't change) so to do a question such as the above we should work modulo $7$.

\n

Since $\\var{offset}\\div 7=\\var{floor(offset/7)}$$\\frac{\\var{modoffset}}{7}$, when it comes to days of the week, '$\\var{offset}$ days later' is the same as '$\\var{modoffset}$ days later'.

\n

Since we started on a {day1}, $\\var{modoffset}$ days later is a {day2}.

", "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "

Applied questions that could be done with modulo arithmetic.

"}, "ungrouped_variables": ["offset", "dayList", "day1number", "day1", "day2number", "day2", "nameList", "name1", "name2", "event", "modoffset"], "extensions": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "statement": "

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

", "tags": [], "rulesets": {}, "parts": [{"prompt": "

If {name1}'s {event} is on a {day1} and {name2}'s is $\\var{offset}$ days later, then {name2}'s {event} is on a [[0]].

", "variableReplacements": [], "showCorrectAnswer": true, "gaps": [{"minMarks": 0, "type": "1_n_2", "scripts": {}, "variableReplacementStrategy": "originalfirst", "displayType": "dropdownlist", "displayColumns": 0, "shuffleChoices": false, "choices": ["

Sunday

", "

Monday

", "

Tuesday

", "

Wednesday

", "

Thursday

", "

Friday

", "

Saturday

"], "variableReplacements": [], "showCorrectAnswer": true, "distractors": ["", "", "", "", "", "", ""], "marks": 0, "matrix": ["if(day2number=0,1,0)", "if(day2number=1,1,0)", "if(day2number=2,1,0)", "if(day2number=3,1,0)", "if(day2number=4,1,0)", "if(day2number=5,1,0)", "if(day2number=6,1,0)"], "showFeedbackIcon": true, "maxMarks": 0}], "marks": 0, "type": "gapfill", "scripts": {}, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst"}], "variables": {"day2": {"group": "Ungrouped variables", "definition": "dayList[day2number]", "description": "", "name": "day2", "templateType": "anything"}, "dayList": {"group": "Ungrouped variables", "definition": "['Sunday', 'Monday', 'Tuesday', 'Wednesday','Thursday','Friday','Saturday']", "description": "", "name": "dayList", "templateType": "anything"}, "day2number": {"group": "Ungrouped variables", "definition": "mod(day1number+offset,7)", "description": "", "name": "day2number", "templateType": "anything"}, "name1": {"group": "Ungrouped variables", "definition": "nameList[0]", "description": "", "name": "name1", "templateType": "anything"}, "offset": {"group": "Ungrouped variables", "definition": "random(25..143)", "description": "", "name": "offset", "templateType": "anything"}, "day1number": {"group": "Ungrouped variables", "definition": "random(0..6)", "description": "", "name": "day1number", "templateType": "anything"}, "modoffset": {"group": "Ungrouped variables", "definition": "mod(offset,7)", "description": "", "name": "modoffset", "templateType": "anything"}, "event": {"group": "Ungrouped variables", "definition": "random('birthday', 'anniversary', 'graduation', 'rostered day off')", "description": "", "name": "event", "templateType": "anything"}, "nameList": {"group": "Ungrouped variables", "definition": "shuffle(['Ben','Annie', 'Clinton', 'Annette', 'Jill', 'David', 'Fran', 'Andrew', 'Keith', 'Abbey', 'Sophie', 'John', 'Simon', 'Klee', 'Daniel', 'Jason', 'Tom', 'Matt', 'Stephan','Elizabeth'])", "description": "", "name": "nameList", "templateType": "anything"}, "day1": {"group": "Ungrouped variables", "definition": "dayList[day1number]", "description": "", "name": "day1", "templateType": "anything"}, "name2": {"group": "Ungrouped variables", "definition": "nameList[1]", "description": "", "name": "name2", "templateType": "anything"}}, "preamble": {"css": "", "js": ""}, "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/"}]}