// Numbas version: exam_results_page_options {"name": "Applied modulo arithmetic: seasons of the year", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"rulesets": {}, "name": "Applied modulo arithmetic: seasons of the year", "parts": [{"type": "gapfill", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showCorrectAnswer": true, "marks": 0, "prompt": "

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

", "scripts": {}, "showFeedbackIcon": true, "gaps": [{"variableReplacements": [], "matrix": ["if(day2number=0,1,0)", "if(day2number=1,1,0)", "if(day2number=2,1,0)", "if(day2number=3,1,0)"], "variableReplacementStrategy": "originalfirst", "minMarks": 0, "displayColumns": 0, "showCorrectAnswer": true, "scripts": {}, "choices": ["

Summer

", "

Autumn

", "

Winter

", "

Spring

"], "displayType": "dropdownlist", "type": "1_n_2", "distractors": ["", "", "", ""], "marks": 0, "shuffleChoices": false, "maxMarks": 0, "showFeedbackIcon": true}]}], "metadata": {"description": "

Applied questions that could be done with modulo arithmetic.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "preamble": {"css": "", "js": ""}, "extensions": [], "statement": "

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

", "variables": {"dayList": {"templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "['Summer', 'Autumn', 'Winter', 'Spring']", "name": "dayList"}, "day1number": {"templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(0..3)", "name": "day1number"}, "modoffset": {"templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "mod(offset,4)", "name": "modoffset"}, "day2": {"templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "dayList[day2number]", "name": "day2"}, "name2": {"templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "nameList[1]", "name": "name2"}, "name1": {"templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "nameList[0]", "name": "name1"}, "event": {"templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(year+'th birthday', 'wedding', 'graduation')", "name": "event"}, "day2number": {"templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "mod(day1number+offset,4)", "name": "day2number"}, "year": {"templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(18..30 except 21..23)", "name": "year"}, "nameList": {"templateType": "anything", "description": "", "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'])", "name": "nameList"}, "offset": {"templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(10..100)", "name": "offset"}, "day1": {"templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "dayList[day1number]", "name": "day1"}}, "functions": {}, "ungrouped_variables": ["offset", "dayList", "day1number", "day1", "day2number", "day2", "nameList", "name1", "name2", "event", "modoffset", "year"], "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

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

\n

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

\n

Since we started in {day1}, $\\var{modoffset}$ seasons later is {day2}.

", "variable_groups": [], "tags": [], "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/"}]}