// Numbas version: exam_results_page_options {"name": "Spreadsheets extension", "metadata": {"description": "", "licence": "None specified"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", ""], "variable_overrides": [[], [], [], []], "questions": [{"name": "Calculate areas of rooms in a house", "extensions": ["sheets"], "custom_part_types": [{"source": {"pk": 4, "author": {"name": "Christian Lawson-Perfect", "pk": 1}, "edit_page": "/beta/part_type/4/edit"}, "name": "Spreadsheet", "short_name": "spreadsheet", "description": "

An editable spreadsheet.

", "help_url": "", "input_widget": "spread-sheet", "input_options": {"correctAnswer": "settings[\"correct_answer\"]", "hint": {"static": true, "value": ""}, "initial_sheet": {"static": false, "value": "disable_cells(settings[\"initial_sheet\"], settings[\"disable_ranges\"])"}}, "can_be_gap": true, "can_be_step": true, "marking_script": "correctAnswer:\nsettings[\"correct_answer\"]\n\nmark:\nif(sum(mark_ranges)=0,\n incorrect(),\n apply(mark_ranges)\n)\n\ninterpreted_answer:\nstudentAnswer\n\nrange_cells:\nmap(parse_range(ref),ref,values(settings[\"mark_ranges\"]))\n\ntotal_cells:\nlen(flatten(range_cells))\n\nrange_weights:\nswitch(\n settings[\"marking_method\"]=\"per_cell\",\n map(len(r)/total_cells, r, range_cells),\n // otherwise, mark per range\n repeat(1/len(range_cells), len(range_cells))\n)\n\nmark_ranges:\nmap(\n let(\n range_credit,\n sum(map(\n let(\n correctCellString, correctAnswer[c],\n correctCellNumber, parsenumber(correctCellString, notation_styles),\n studentCellString, studentAnswer[c],\n studentCellNumber, parsenumber(studentCellString, notation_styles),\n award(\n 1/len(cells), \n if(isnan(correctCellNumber) and correctCellString<>\"\",\n lower(correctCellString) = lower(studentCellString),\n abs(studentCellNumber - if(isnan(correctCellNumber),0,correctCellNumber)) <= settings[\"tolerance\"]\n )\n )\n ),\n c,\n cells\n )),\n message,\n switch(\n range_credit=0,\n if(len(cells)=1, \"This entry is incorrect.\", \"All entries in this range are incorrect.\"),\n range_credit=1,\n if(len(cells)=1, \"This entry is correct.\", \"All entries in this range are correct.\"),\n //otherwise\n \"Some entries in this range are correct.\"\n ),\n assert(len(cells)=0, add_credit(range_credit*w, \"{name}: \"+message)); \n range_credit\n ),\n [cells,w,name],\n zip(range_cells, range_weights, keys(settings[\"mark_ranges\"]))\n)\n\nnotation_styles:\n[\"plain\",\"si-en\"]", "marking_notes": [{"name": "correctAnswer", "description": "", "definition": "settings[\"correct_answer\"]"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(sum(mark_ranges)=0,\n incorrect(),\n apply(mark_ranges)\n)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "studentAnswer"}, {"name": "range_cells", "description": "", "definition": "map(parse_range(ref),ref,values(settings[\"mark_ranges\"]))"}, {"name": "total_cells", "description": "

The total number of cells to be marked.

", "definition": "len(flatten(range_cells))"}, {"name": "range_weights", "description": "", "definition": "switch(\n settings[\"marking_method\"]=\"per_cell\",\n map(len(r)/total_cells, r, range_cells),\n // otherwise, mark per range\n repeat(1/len(range_cells), len(range_cells))\n)"}, {"name": "mark_ranges", "description": "", "definition": "map(\n let(\n range_credit,\n sum(map(\n let(\n correctCellString, correctAnswer[c],\n correctCellNumber, parsenumber(correctCellString, notation_styles),\n studentCellString, studentAnswer[c],\n studentCellNumber, parsenumber(studentCellString, notation_styles),\n award(\n 1/len(cells), \n if(isnan(correctCellNumber) and correctCellString<>\"\",\n lower(correctCellString) = lower(studentCellString),\n abs(studentCellNumber - if(isnan(correctCellNumber),0,correctCellNumber)) <= settings[\"tolerance\"]\n )\n )\n ),\n c,\n cells\n )),\n message,\n switch(\n range_credit=0,\n if(len(cells)=1, \"This entry is incorrect.\", \"All entries in this range are incorrect.\"),\n range_credit=1,\n if(len(cells)=1, \"This entry is correct.\", \"All entries in this range are correct.\"),\n //otherwise\n \"Some entries in this range are correct.\"\n ),\n assert(len(cells)=0, add_credit(range_credit*w, \"{name}: \"+message)); \n range_credit\n ),\n [cells,w,name],\n zip(range_cells, range_weights, keys(settings[\"mark_ranges\"]))\n)"}, {"name": "notation_styles", "description": "", "definition": "[\"plain\",\"si-en\"]"}], "settings": [{"name": "initial_sheet", "label": "Initial sheet", "help_url": "", "hint": "A spreadsheet object giving the initial state of the sheet that the student should fill in.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "correct_answer", "label": "Correct answer", "help_url": "", "hint": "A spreadsheet object representing a correct answer to the part.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "disable_ranges", "label": "Ranges to disable", "help_url": "", "hint": "A list of cell or range references, denoting the cells that should not be editable.", "input_type": "code", "default_value": "[]", "evaluate": true}, {"name": "mark_ranges", "label": "Ranges to mark", "help_url": "", "hint": "A dictionary mapping names to cell or range references, denoting the cells that should be compared for equality with the expected answer.", "input_type": "code", "default_value": "dict()", "evaluate": true}, {"name": "marking_method", "label": "Marking method", "help_url": "", "hint": "", "input_type": "dropdown", "default_value": "per_cell", "choices": [{"value": "per_cell", "label": "Each cell has the same weight"}, {"value": "per_range", "label": "Each range has the same weight"}]}, {"name": "tolerance", "label": "Allowed margin of error", "help_url": "", "hint": "", "input_type": "code", "default_value": "0", "evaluate": true}], "public_availability": "restricted", "published": false, "extensions": ["sheets"]}], "resources": [["question-resources/house-outline.svg", "/srv/numbas/beta/media/question-resources/house-outline.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/beta/accounts/profile/1/"}, {"name": "Christian Lawson-Perfect", "profile_url": "http://clppc:8000/accounts/profile/1/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

A surveyor has measured the rooms in a house and produced the following drawing (not to scale):

\n

\"Plan

\n

Measurements are given in metres.

", "advice": "

First write in the dimensions given on the drawing:

\n

{update_range(dimensions_spreadsheet, \"B2:C6\", highlight_style)}

\n

Next, calculate the area of each room, by multiplying the width by the height. Round to the nearest 0.01m2.

\n

{update_range(areas_spreadsheet, \"D2:D6\", highlight_style)}

\n

Then, add up the areas to find the total area:

\n

{update_range(filled_spreadsheet, \"D7\", highlight_style)}

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"raw_spreadsheet": {"name": "raw_spreadsheet", "group": "Spreadsheet", "definition": "spreadsheet_from_base64_file(safe(\"room-areas.xlsx\"), safe(\"UEsDBBQACAgIAKhmP1YAAAAAAAAAAAAAAAALAAAAX3JlbHMvLnJlbHOtks9KAzEQh+99ipB7d7YVRGSzvYjQm0h9gJjM/mE3mTAZdX17gwhaqaUHj0l+8803Q5rdEmb1ipxHikZvqlorjI78GHujnw736xu9a1fNI85WSiQPY8qq1MRs9CCSbgGyGzDYXFHCWF464mClHLmHZN1ke4RtXV8D/2To9oip9t5o3vuNVof3hJewqetGh3fkXgJGOdHiV6KQLfcoRi8zvBFPz0RTVaAaTrtsL3f5e04IKNZbseCIcZ24VLOMmL91PLmHcp0/E+eErv5zObgIRo/+vJJN6cto1cDRJ2g/AFBLBwhmqoK34AAAADsCAABQSwMEFAAICAgAqGY/VgAAAAAAAAAAAAAAAA8AAAB4bC93b3JrYm9vay54bWyNU8lu2zAQvfcrBN5tLV5qG5YDV46QAN0Qp8mZkkYWa4oUyPGWov/eEWWlKdpDDzY5C9+8mXla3pxr6R3BWKFVzMJhwDxQuS6E2sXs22M6mDHPIlcFl1pBzC5g2c3q3fKkzT7Teu/Re2VjViE2C9+3eQU1t0PdgKJIqU3NkUyz821jgBe2AsBa+lEQTP2aC8U6hIX5HwxdliKHjc4PNSjsQAxIjsTeVqKxbLUshYSnriGPN81nXhPthMuc+atX2l+Nl/F8f2hSyo5ZyaUFarTSpy/Zd8iROuJSMq/gCOE8GPcpf0BopEwqQ87W8STgZH/HW9Mh3mkjXrRCLre50VLGDM3hWo2Iosj/Fdm2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G1sUEsBAhQAFAAICAgAqGY/ViibsHX9AwAAKgwAABgAAAAAAAAAAAAAAAAAcQYAAHhsL3dvcmtzaGVldHMvc2hlZXQxLnhtbFBLAQIUABQACAgIAKhmP1ZP8Pl60gAAACUCAAAaAAAAAAAAAAAAAAAAALQKAAB4bC9fcmVscy93b3JrYm9vay54bWwucmVsc1BLAQIUABQACAgIAKhmP1a/lDZJ4wAAAF8CAAAUAAAAAAAAAAAAAAAAAM4LAAB4bC9zaGFyZWRTdHJpbmdzLnhtbFBLAQIUABQACAgIAKhmP1ahHSHXYgEAANsCAAARAAAAAAAAAAAAAAAAAPMMAABkb2NQcm9wcy9jb3JlLnhtbFBLAQIUABQACAgIAKhmP1ajIgFW+wAAAJsBAAAQAAAAAAAAAAAAAAAAAJQOAABkb2NQcm9wcy9hcHAueG1sUEsBAhQAFAAICAgAqGY/Vo/25TZZAQAAVwUAABMAAAAAAAAAAAAAAAAAzQ8AAFtDb250ZW50X1R5cGVzXS54bWxQSwUGAAAAAAkACQA/AgAAZxEAAAAA\"))", "description": "", "templateType": "spreadsheet", "can_override": false}, "spreadsheet": {"name": "spreadsheet", "group": "Spreadsheet", "definition": "raw_spreadsheet", "description": "", "templateType": "anything", "can_override": false}, "dimensions": {"name": "dimensions", "group": "Measurements", "definition": "[\n [x1+x2,y1],\n [x3,y1+y2+y3],\n [x1,y2],\n [x2,y2],\n [x1+x2,y3]\n]", "description": "", "templateType": "anything", "can_override": false}, "filled_spreadsheet": {"name": "filled_spreadsheet", "group": "Spreadsheet", "definition": "fill_range(areas_spreadsheet, \"D7\", [precround(total_area,2)])\n", "description": "

The completed spreadsheet, with the total area cell filled in.

", "templateType": "anything", "can_override": false}, "areas": {"name": "areas", "group": "Ungrouped variables", "definition": "map(x*y,[x,y],dimensions)", "description": "

The area of each room.

", "templateType": "anything", "can_override": false}, "names": {"name": "names", "group": "Ungrouped variables", "definition": "map(x[0],x,spreadsheet[\"A2:A6\"])", "description": "

Names of the rooms.

", "templateType": "anything", "can_override": false}, "dims": {"name": "dims", "group": "Ungrouped variables", "definition": "map(\"{dpformat(w,2)} \u00d7 {dpformat(h,2)}\",[w,h],dimensions)", "description": "

Strings describing the rooms' dimensions, to insert in the image.

", "templateType": "anything", "can_override": false}, "total_area": {"name": "total_area", "group": "Ungrouped variables", "definition": "sum(areas)", "description": "

The total area of the house.

", "templateType": "anything", "can_override": false}, "dimensions_spreadsheet": {"name": "dimensions_spreadsheet", "group": "Spreadsheet", "definition": "fill_range(spreadsheet, \"B2:C6\", dimensions)", "description": "

The spreadsheet with the dimensions filled in but not the areas.

", "templateType": "anything", "can_override": false}, "areas_spreadsheet": {"name": "areas_spreadsheet", "group": "Spreadsheet", "definition": "fill_range(dimensions_spreadsheet, \"D2:D6\", map(precround(x,2),x,areas))", "description": "

The spreadsheet with dimensions and areas filled in.

", "templateType": "anything", "can_override": false}, "highlight_style": {"name": "highlight_style", "group": "Ungrouped variables", "definition": "[\"style\": [\"fill\": [\"fgColor\": [\"rgb\": \"ccccff\"]]]]", "description": "

Style which fills in cells with a bright colour to highlight them.

", "templateType": "anything", "can_override": false}, "x1,x2,x3": {"name": "x1,x2,x3", "group": "Ungrouped variables", "definition": "repeat(precround(random(1..2#0.01),2), 3)", "description": "

The three widths - the width of hallway 1, hallway 2, and the dining room.

", "templateType": "anything", "can_override": false}, "y1,y2,y3": {"name": "y1,y2,y3", "group": "Ungrouped variables", "definition": "repeat(precround(random(1..2#0.01),2), 3)", "description": "

The three vertical measurements: kitchen, hallway, and living room.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["x1,x2,x3", "y1,y2,y3", "names", "dims", "areas", "total_area", "highlight_style"], "variable_groups": [{"name": "Spreadsheet", "variables": ["raw_spreadsheet", "spreadsheet", "dimensions_spreadsheet", "areas_spreadsheet", "filled_spreadsheet"]}, {"name": "Measurements", "variables": ["dimensions"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "spreadsheet", "useCustomName": false, "customName": "", "marks": "30", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Fill in this survey form. Give lengths in metres to the nearest centimetre, and areas in square metres to the nearest 0.01 m2.

", "settings": {"initial_sheet": "spreadsheet", "correct_answer": "filled_spreadsheet", "disable_ranges": "[\"A1:D1\", \"A1:A6\",\"A7:C7\"]", "mark_ranges": "[\"Dimensions\": \"B2:C6\", \"Areas\": \"D2:D6\", \"Total area\": \"D7\"]", "marking_method": "per_range", "tolerance": "0.01"}}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Journey record", "extensions": ["sheets"], "custom_part_types": [{"source": {"pk": 4, "author": {"name": "Christian Lawson-Perfect", "pk": 1}, "edit_page": "/beta/part_type/4/edit"}, "name": "Spreadsheet", "short_name": "spreadsheet", "description": "

An editable spreadsheet.

", "help_url": "", "input_widget": "spread-sheet", "input_options": {"correctAnswer": "settings[\"correct_answer\"]", "hint": {"static": true, "value": ""}, "initial_sheet": {"static": false, "value": "disable_cells(settings[\"initial_sheet\"], settings[\"disable_ranges\"])"}}, "can_be_gap": true, "can_be_step": true, "marking_script": "correctAnswer:\nsettings[\"correct_answer\"]\n\nmark:\nif(sum(mark_ranges)=0,\n incorrect(),\n apply(mark_ranges)\n)\n\ninterpreted_answer:\nstudentAnswer\n\nrange_cells:\nmap(parse_range(ref),ref,values(settings[\"mark_ranges\"]))\n\ntotal_cells:\nlen(flatten(range_cells))\n\nrange_weights:\nswitch(\n settings[\"marking_method\"]=\"per_cell\",\n map(len(r)/total_cells, r, range_cells),\n // otherwise, mark per range\n repeat(1/len(range_cells), len(range_cells))\n)\n\nmark_ranges:\nmap(\n let(\n range_credit,\n sum(map(\n let(\n correctCellString, correctAnswer[c],\n correctCellNumber, parsenumber(correctCellString, notation_styles),\n studentCellString, studentAnswer[c],\n studentCellNumber, parsenumber(studentCellString, notation_styles),\n award(\n 1/len(cells), \n if(isnan(correctCellNumber) and correctCellString<>\"\",\n lower(correctCellString) = lower(studentCellString),\n abs(studentCellNumber - if(isnan(correctCellNumber),0,correctCellNumber)) <= settings[\"tolerance\"]\n )\n )\n ),\n c,\n cells\n )),\n message,\n switch(\n range_credit=0,\n if(len(cells)=1, \"This entry is incorrect.\", \"All entries in this range are incorrect.\"),\n range_credit=1,\n if(len(cells)=1, \"This entry is correct.\", \"All entries in this range are correct.\"),\n //otherwise\n \"Some entries in this range are correct.\"\n ),\n assert(len(cells)=0, add_credit(range_credit*w, \"{name}: \"+message)); \n range_credit\n ),\n [cells,w,name],\n zip(range_cells, range_weights, keys(settings[\"mark_ranges\"]))\n)\n\nnotation_styles:\n[\"plain\",\"si-en\"]", "marking_notes": [{"name": "correctAnswer", "description": "", "definition": "settings[\"correct_answer\"]"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(sum(mark_ranges)=0,\n incorrect(),\n apply(mark_ranges)\n)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "studentAnswer"}, {"name": "range_cells", "description": "", "definition": "map(parse_range(ref),ref,values(settings[\"mark_ranges\"]))"}, {"name": "total_cells", "description": "

The total number of cells to be marked.

", "definition": "len(flatten(range_cells))"}, {"name": "range_weights", "description": "", "definition": "switch(\n settings[\"marking_method\"]=\"per_cell\",\n map(len(r)/total_cells, r, range_cells),\n // otherwise, mark per range\n repeat(1/len(range_cells), len(range_cells))\n)"}, {"name": "mark_ranges", "description": "", "definition": "map(\n let(\n range_credit,\n sum(map(\n let(\n correctCellString, correctAnswer[c],\n correctCellNumber, parsenumber(correctCellString, notation_styles),\n studentCellString, studentAnswer[c],\n studentCellNumber, parsenumber(studentCellString, notation_styles),\n award(\n 1/len(cells), \n if(isnan(correctCellNumber) and correctCellString<>\"\",\n lower(correctCellString) = lower(studentCellString),\n abs(studentCellNumber - if(isnan(correctCellNumber),0,correctCellNumber)) <= settings[\"tolerance\"]\n )\n )\n ),\n c,\n cells\n )),\n message,\n switch(\n range_credit=0,\n if(len(cells)=1, \"This entry is incorrect.\", \"All entries in this range are incorrect.\"),\n range_credit=1,\n if(len(cells)=1, \"This entry is correct.\", \"All entries in this range are correct.\"),\n //otherwise\n \"Some entries in this range are correct.\"\n ),\n assert(len(cells)=0, add_credit(range_credit*w, \"{name}: \"+message)); \n range_credit\n ),\n [cells,w,name],\n zip(range_cells, range_weights, keys(settings[\"mark_ranges\"]))\n)"}, {"name": "notation_styles", "description": "", "definition": "[\"plain\",\"si-en\"]"}], "settings": [{"name": "initial_sheet", "label": "Initial sheet", "help_url": "", "hint": "A spreadsheet object giving the initial state of the sheet that the student should fill in.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "correct_answer", "label": "Correct answer", "help_url": "", "hint": "A spreadsheet object representing a correct answer to the part.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "disable_ranges", "label": "Ranges to disable", "help_url": "", "hint": "A list of cell or range references, denoting the cells that should not be editable.", "input_type": "code", "default_value": "[]", "evaluate": true}, {"name": "mark_ranges", "label": "Ranges to mark", "help_url": "", "hint": "A dictionary mapping names to cell or range references, denoting the cells that should be compared for equality with the expected answer.", "input_type": "code", "default_value": "dict()", "evaluate": true}, {"name": "marking_method", "label": "Marking method", "help_url": "", "hint": "", "input_type": "dropdown", "default_value": "per_cell", "choices": [{"value": "per_cell", "label": "Each cell has the same weight"}, {"value": "per_range", "label": "Each range has the same weight"}]}, {"name": "tolerance", "label": "Allowed margin of error", "help_url": "", "hint": "", "input_type": "code", "default_value": "0", "evaluate": true}], "public_availability": "restricted", "published": false, "extensions": ["sheets"]}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/beta/accounts/profile/1/"}, {"name": "Christian Lawson-Perfect", "profile_url": "http://clppc:8000/accounts/profile/1/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

{data_spreadsheet}

\n

You are travelling from {from} to {to}.

\n

You travel {distance_description}.

", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"raw_spreadsheet": {"name": "raw_spreadsheet", "group": "Journey record form", "definition": "spreadsheet_from_base64_file(safe(\"journey.xlsx\"), safe(\"UEsDBBQACAgIAOhtuVYAAAAAAAAAAAAAAAALAAAAX3JlbHMvLnJlbHOtks9KAzEQh+99ipB7d7YVRGSzvYjQm0h9gJjM/mE3mTAZdX17gwhaqaUHj0l+8803Q5rdEmb1ipxHikZvqlorjI78GHujnw736xu9a1fNI85WSiQPY8qq1MRs9CCSbgGyGzDYXFHCWF464mClHLmHZN1ke4RtXV8D/2To9oip9t5o3vuNVof3hJewqetGh3fkXgJGOdHiV6KQLfcoRi8zvBFPz0RTVaAaTrtsL3f5e04IKNZbseCIcZ24VLOMmL91PLmHcp0/E+eErv5zObgIRo/+vJJN6cto1cDRJ2g/AFBLBwhmqoK34AAAADsCAABQSwMEFAAICAgA6G25VgAAAAAAAAAAAAAAAA8AAAB4bC93b3JrYm9vay54bWyNU8lu2zAQvfcrBN5tLV5qG5YDV46QAN0Qp8mZkkYWa4oUyPGWov/eEWWlKdpDDzY5C9+8mXla3pxr6R3BWKFVzMJhwDxQuS6E2sXs22M6mDHPIlcFl1pBzC5g2c3q3fKkzT7Teu/Re2VjViE2C9+3eQU1t0PdgKJIqU3NkUyz821jgBe2AsBa+lEQTP2aC8U6hIX5HwxdliKHjc4PNSjsQAxIjsTeVqKxbLUshYSnriGPN81nXhPthMuc+atX2l+Nl/F8f2hSyo5ZyaUFarTSpy/Zd8iROuJSMq/gCOE8GPcpf0BopEwqQ87W8STgZH/HW9Mh3mkjXr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IQAABkb2NQcm9wcy9hcHAueG1sUEsBAhQAFAAICAgA6G25Vo/25TZZAQAAVwUAABMAAAAAAAAAAAAAAAAAvBEAAFtDb250ZW50X1R5cGVzXS54bWxQSwUGAAAAAAkACQA/AgAAVhMAAAAA\"))", "description": "", "templateType": "spreadsheet", "can_override": false}, "filled_spreadsheet": {"name": "filled_spreadsheet", "group": "Journey record form", "definition": "fill_range(\n fill_range(\n fill_range(raw_spreadsheet, \"B2:B3\", [from,to]),\n \"B6:E10\",\n list(transpose(matrix([mode_distances,journey_cost,journey_co2,journey_time])))\n ),\n \"B11:E11\",\n totals\n)", "description": "", "templateType": "anything", "can_override": false}, "from,to": {"name": "from,to", "group": "Ungrouped variables", "definition": "shuffle(cities)", "description": "", "templateType": "anything", "can_override": false}, "cities": {"name": "cities", "group": "Cities", "definition": "data_spreadsheet[\"B2:E2\"][0]", "description": "", "templateType": "anything", "can_override": false}, "cost_per_km": {"name": "cost_per_km", "group": "Costs", "definition": "map(precround(x,2),x,[\n random(0.5..1.5#0),\n random(0.2..1#0),\n random(0.5..3#0),\n 0,\n random(0.01..0.05#0),\n])", "description": "

The average cost per km of each mode of transport.

", "templateType": "anything", "can_override": false}, "co2_per_km": {"name": "co2_per_km", "group": "Costs", "definition": "map(precround(x,3),x,[\n random(0.15..0.2#0),\n random(0.1..0.15#0),\n random(0.03..0.06#0),\n 0,\n 0\n])", "description": "

The average CO2 emissions per km of each mode of transport.

", "templateType": "anything", "can_override": false}, "speed": {"name": "speed", "group": "Costs", "definition": "[\n random(45..115#5),\n random(30..80#5),\n random(90..210#5),\n random(3..6),\n random(25..40)\n]", "description": "

The average travel speed of each mode of transport.

", "templateType": "anything", "can_override": false}, "raw_data_spreadsheet": {"name": "raw_data_spreadsheet", "group": "Data spreadsheet", "definition": "spreadsheet_from_base64_file(safe(\"journey-data.xlsx\"), safe(\"UEsDBBQACAgIAHlXuVYAAAAAAAAAAAAAAAALAAAAX3JlbHMvLnJlbHOtks9KAzEQh+99ipB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SwUGAAAAAAkACQA/AgAAExQAAAAA\"))", "description": "", "templateType": "spreadsheet", "can_override": false}, "data_spreadsheet": {"name": "data_spreadsheet", "group": "Data spreadsheet", "definition": "fill_range(raw_data_spreadsheet, \"B9:D13\", list(transpose(matrix([cost_per_km,co2_per_km,speed]))))", "description": "", "templateType": "anything", "can_override": false}, "distance": {"name": "distance", "group": "Distance travelled", "definition": "let(\n c1,indices(cities,from)[0],\n c2,indices(cities,to)[0],\n\n let(\n a,max(c1,c2),\n b,min(c1,c2),\n n,parsenumber(data_spreadsheet[\"{upper(letterordinal(a+1))}{b+3}\"],\"plain\"),\n \n if(isnan(n),0,n)\n )\n)", "description": "

The distance between the chosen cities.

", "templateType": "anything", "can_override": false}, "mode_distances": {"name": "mode_distances", "group": "Distance travelled", "definition": "let(\n num_modes, random(2..3),\n shuffle(random_integer_partition(distance,num_modes)+repeat(0,5-num_modes))\n)", "description": "", "templateType": "anything", "can_override": false}, "transport_modes": {"name": "transport_modes", "group": "Distance travelled", "definition": "map(x[0],x,raw_spreadsheet[\"A6:A10\"])", "description": "", "templateType": "anything", "can_override": false}, "distance_description": {"name": "distance_description", "group": "Distance travelled", "definition": "let(\n used_modes, filter(x[0]>0,x,zip(mode_distances, transport_modes)),\n texts, map(\"{d}km {lower(mode)}\",[d,mode], used_modes[0..len(used_modes)]),\n \n if(len(used_modes)>1,\n join(texts[0..-1], \", \")\n +\n \", and the rest \"+lower(used_modes[-1][1])\n ,\n texts[0]\n )\n)", "description": "", "templateType": "anything", "can_override": false}, "journey_cost": {"name": "journey_cost", "group": "Costs", "definition": "map(precround(d*c,2),[d,c],zip(mode_distances,cost_per_km))", "description": "

The incurred cost of each mode of transport.

", "templateType": "anything", "can_override": false}, "journey_co2": {"name": "journey_co2", "group": "Costs", "definition": "map(precround(d*c,3),[d,c],zip(mode_distances,co2_per_km))", "description": "", "templateType": "anything", "can_override": false}, "journey_time": {"name": "journey_time", "group": "Costs", "definition": "map(round(60*d/s),[d,s],zip(mode_distances,speed))", "description": "", "templateType": "anything", "can_override": false}, "totals": {"name": "totals", "group": "Costs", "definition": "map(precround(sum(l),2),l,[mode_distances,journey_cost,journey_co2,journey_time])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["from,to"], "variable_groups": [{"name": "Data spreadsheet", "variables": ["raw_data_spreadsheet", "data_spreadsheet"]}, {"name": "Cities", "variables": ["cities"]}, {"name": "Costs", "variables": ["co2_per_km", "cost_per_km", "speed", "journey_cost", "journey_co2", "journey_time", "totals"]}, {"name": "Journey record form", "variables": ["raw_spreadsheet", "filled_spreadsheet"]}, {"name": "Distance travelled", "variables": ["mode_distances", "distance", "transport_modes", "distance_description"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "spreadsheet", "useCustomName": false, "customName": "", "marks": "26", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Using the data sheet above, fill in the journey record form below.

\n

Round costs to the nearest penny, CO2 emissions to the nearest gram, and time to the nearest minute.

", "settings": {"initial_sheet": "raw_spreadsheet", "correct_answer": "filled_spreadsheet", "disable_ranges": "[\"A1:D1\",\"A2:A3\",\"A4:D4\",\"A5:D5\", \"A5:A11\"]", "mark_ranges": "[\n \"From and To\": \"B2:B3\",\n \"Distance travelled\": \"B6:B10\",\n \"Cost\": \"C6:C10\",\n \"CO2 emissions\": \"D6:D10\",\n \"Time\": \"E6:E10\",\n \"Totals\": \"B11:E11\"\n]", "marking_method": "per_cell", "tolerance": "0.01"}}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "PhET springs experiment", "extensions": ["jsxgraph", "sheets"], "custom_part_types": [{"source": {"pk": 4, "author": {"name": "Christian Lawson-Perfect", "pk": 1}, "edit_page": "/beta/part_type/4/edit"}, "name": "Spreadsheet", "short_name": "spreadsheet", "description": "

An editable spreadsheet.

", "help_url": "", "input_widget": "spread-sheet", "input_options": {"correctAnswer": "settings[\"correct_answer\"]", "hint": {"static": true, "value": ""}, "initial_sheet": {"static": false, "value": "disable_cells(settings[\"initial_sheet\"], settings[\"disable_ranges\"])"}}, "can_be_gap": true, "can_be_step": true, "marking_script": "correctAnswer:\nsettings[\"correct_answer\"]\n\nmark:\nif(sum(mark_ranges)=0,\n incorrect(),\n apply(mark_ranges)\n)\n\ninterpreted_answer:\nstudentAnswer\n\nrange_cells:\nmap(parse_range(ref),ref,values(settings[\"mark_ranges\"]))\n\ntotal_cells:\nlen(flatten(range_cells))\n\nrange_weights:\nswitch(\n settings[\"marking_method\"]=\"per_cell\",\n map(len(r)/total_cells, r, range_cells),\n // otherwise, mark per range\n repeat(1/len(range_cells), len(range_cells))\n)\n\nmark_ranges:\nmap(\n let(\n range_credit,\n sum(map(\n let(\n correctCellString, correctAnswer[c],\n correctCellNumber, parsenumber(correctCellString, notation_styles),\n studentCellString, studentAnswer[c],\n studentCellNumber, parsenumber(studentCellString, notation_styles),\n award(\n 1/len(cells), \n if(isnan(correctCellNumber) and correctCellString<>\"\",\n lower(correctCellString) = lower(studentCellString),\n abs(studentCellNumber - if(isnan(correctCellNumber),0,correctCellNumber)) <= settings[\"tolerance\"]\n )\n )\n ),\n c,\n cells\n )),\n message,\n switch(\n range_credit=0,\n if(len(cells)=1, \"This entry is incorrect.\", \"All entries in this range are incorrect.\"),\n range_credit=1,\n if(len(cells)=1, \"This entry is correct.\", \"All entries in this range are correct.\"),\n //otherwise\n \"Some entries in this range are correct.\"\n ),\n assert(len(cells)=0, add_credit(range_credit*w, \"{name}: \"+message)); \n range_credit\n ),\n [cells,w,name],\n zip(range_cells, range_weights, keys(settings[\"mark_ranges\"]))\n)\n\nnotation_styles:\n[\"plain\",\"si-en\"]", "marking_notes": [{"name": "correctAnswer", "description": "", "definition": "settings[\"correct_answer\"]"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(sum(mark_ranges)=0,\n incorrect(),\n apply(mark_ranges)\n)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "studentAnswer"}, {"name": "range_cells", "description": "", "definition": "map(parse_range(ref),ref,values(settings[\"mark_ranges\"]))"}, {"name": "total_cells", "description": "

The total number of cells to be marked.

", "definition": "len(flatten(range_cells))"}, {"name": "range_weights", "description": "", "definition": "switch(\n settings[\"marking_method\"]=\"per_cell\",\n map(len(r)/total_cells, r, range_cells),\n // otherwise, mark per range\n repeat(1/len(range_cells), len(range_cells))\n)"}, {"name": "mark_ranges", "description": "", "definition": "map(\n let(\n range_credit,\n sum(map(\n let(\n correctCellString, correctAnswer[c],\n correctCellNumber, parsenumber(correctCellString, notation_styles),\n studentCellString, studentAnswer[c],\n studentCellNumber, parsenumber(studentCellString, notation_styles),\n award(\n 1/len(cells), \n if(isnan(correctCellNumber) and correctCellString<>\"\",\n lower(correctCellString) = lower(studentCellString),\n abs(studentCellNumber - if(isnan(correctCellNumber),0,correctCellNumber)) <= settings[\"tolerance\"]\n )\n )\n ),\n c,\n cells\n )),\n message,\n switch(\n range_credit=0,\n if(len(cells)=1, \"This entry is incorrect.\", \"All entries in this range are incorrect.\"),\n range_credit=1,\n if(len(cells)=1, \"This entry is correct.\", \"All entries in this range are correct.\"),\n //otherwise\n \"Some entries in this range are correct.\"\n ),\n assert(len(cells)=0, add_credit(range_credit*w, \"{name}: \"+message)); \n range_credit\n ),\n [cells,w,name],\n zip(range_cells, range_weights, keys(settings[\"mark_ranges\"]))\n)"}, {"name": "notation_styles", "description": "", "definition": "[\"plain\",\"si-en\"]"}], "settings": [{"name": "initial_sheet", "label": "Initial sheet", "help_url": "", "hint": "A spreadsheet object giving the initial state of the sheet that the student should fill in.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "correct_answer", "label": "Correct answer", "help_url": "", "hint": "A spreadsheet object representing a correct answer to the part.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "disable_ranges", "label": "Ranges to disable", "help_url": "", "hint": "A list of cell or range references, denoting the cells that should not be editable.", "input_type": "code", "default_value": "[]", "evaluate": true}, {"name": "mark_ranges", "label": "Ranges to mark", "help_url": "", "hint": "A dictionary mapping names to cell or range references, denoting the cells that should be compared for equality with the expected answer.", "input_type": "code", "default_value": "dict()", "evaluate": true}, {"name": "marking_method", "label": "Marking method", "help_url": "", "hint": "", "input_type": "dropdown", "default_value": "per_cell", "choices": [{"value": "per_cell", "label": "Each cell has the same weight"}, {"value": "per_range", "label": "Each range has the same weight"}]}, {"name": "tolerance", "label": "Allowed margin of error", "help_url": "", "hint": "", "input_type": "code", "default_value": "0", "evaluate": true}], "public_availability": "restricted", "published": false, "extensions": ["sheets"]}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/beta/accounts/profile/1/"}, {"name": "Christian Lawson-Perfect", "profile_url": "http://clppc:8000/accounts/profile/1/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

\n

Select the Lab experiment.

\n

Choose the strength of your spring. Keep the strength the same throughout the experiment.

\n

Measure the difference between the unstretched length and the resting position for a variety of masses, and enter your measurements in the table below.

", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"raw_spreadsheet": {"name": "raw_spreadsheet", "group": "Ungrouped variables", "definition": "spreadsheet_from_base64_file(safe(\"spring.xlsx\"), safe(\"UEsDBBQACAgIANhKuVYAAAAAAAAAAAAAAAALAAAAX3JlbHMvLnJlbHOtks9KAzEQh+99ipB7d7YVRGSzvYjQm0h9gJjM/mE3mTAZdX17gwhaqaUHj0l+8803Q5rdEmb1ipxHikZvqlorjI78GHujnw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KxdJgOb2POf8LEb9+Ec/mn0vuYOxGNw+L4Hn8Ahd58PxM+dsR5/Bge/N/GZO6JTi0Tgguwf/V4Rqf+cGuJbFyC+ao8y1n6U03dQSwcIj/blNlkBAABXBQAAUEsBAhQAFAAICAgA2Eq5VmaqgrfgAAAAOwIAAAsAAAAAAAAAAAAAAAAAAAAAAF9yZWxzLy5yZWxzUEsBAhQAFAAICAgA2Eq5Vot4M+33AQAAbgMAAA8AAAAAAAAAAAAAAAAAGQEAAHhsL3dvcmtib29rLnhtbFBLAQIUABQACAgIANhKuVZRjEuTrAIAAFUTAAANAAAAAAAAAAAAAAAAAE0DAAB4bC9zdHlsZXMueG1sUEsBAhQAFAAICAgA2Eq5Vv76Fm2YAwAAQQgAABgAAAAAAAAAAAAAAAAANAYAAHhsL3dvcmtzaGVldHMvc2hlZXQxLnhtbFBLAQIUABQACAgIANhKuVZP8Pl60gAAACUCAAAaAAAAAAAAAAAAAAAAABIKAAB4bC9fcmVscy93b3JrYm9vay54bWwucmVsc1BLAQIUABQACAgIANhKuVbYzx+mxQAAAEkBAAAUAAAAAAAAAAAAAAAAACwLAAB4bC9zaGFyZWRTdHJpbmdzLnhtbFBLAQIUABQACAgIANhKuVYRQeV+ZgEAANsCAAARAAAAAAAAAAAAAAAAADMMAABkb2NQcm9wcy9jb3JlLnhtbFBLAQIUABQACAgIANhKuVa9tiBH+gAAAJsBAAAQAAAAAAAAAAAAAAAAANgNAABkb2NQcm9wcy9hcHAueG1sUEsBAhQAFAAICAgA2Eq5Vo/25TZZAQAAVwUAABMAAAAAAAAAAAAAAAAAEA8AAFtDb250ZW50X1R5cGVzXS54bWxQSwUGAAAAAAkACQA/AgAAqhAAAAAA\"))", "description": "", "templateType": "spreadsheet", "can_override": false}, "blank_spreadsheet": {"name": "blank_spreadsheet", "group": "Ungrouped variables", "definition": "slice(raw_spreadsheet,\"A1:C6\")", "description": "

The spreadsheet with some rows added

", "templateType": "anything", "can_override": false}, "plot": {"name": "plot", "group": "Ungrouped variables", "definition": "jsxgraph(\n 600,600,[-25,110,310,-5],\n dict(map([\"p{i}\", [\"point\",[0,0], [\"id\": \"p{i}\", \"withLabel\": false]]],i,0..4)),\n [\"axes\":true]\n)", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "let(valid_entries, filter(not (isnan(x[0]) or isnan(x[1])), x, zip(masses,lengths)),\n sum(map(l/m, [m,l], valid_entries))/len(valid_entries)\n)", "description": "", "templateType": "anything", "can_override": false}, "masses": {"name": "masses", "group": "Ungrouped variables", "definition": "map(parsenumber(x,\"plain\"),[x],filled_spreadsheet[\"A2:A6\"])", "description": "", "templateType": "anything", "can_override": false}, "lengths": {"name": "lengths", "group": "Ungrouped variables", "definition": "map(parsenumber(x,\"plain\"),[x],filled_spreadsheet[\"B2:B6\"])", "description": "", "templateType": "anything", "can_override": false}, "filled_spreadsheet": {"name": "filled_spreadsheet", "group": "Ungrouped variables", "definition": "fill_range(blank_spreadsheet, \"A2:C6\",\n [\n [\"6\",\"1\", \"0.1666\"],\n [\"12\",\"2\", \"0.1666\"],\n [\"18\",\"3\", \"0.1666\"],\n [\"24\",\"4\", \"0.1666\"],\n [\"30\",\"5\", \"0.1666\"],\n ]\n)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["raw_spreadsheet", "blank_spreadsheet", "plot", "filled_spreadsheet", "masses", "lengths", "k"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": "iframe.phet {\n width: 100%;\n height: 80vh;\n}"}, "parts": [{"type": "spreadsheet", "useCustomName": false, "customName": "", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "masses: map(parsenumber(x,\"plain\"),[x],studentAnswer[\"A2:A6\"])\n\nlengths: map(parsenumber(x,\"plain\"),[x],studentAnswer[\"B2:B6\"])\n\npoints: map(plot[\"p{i}\"], i, 0..4)\n\npositions:\n map(vector(mass,length), [mass, length], filter(not (isnan(x[0]) or isnan(x[1])), x, zip(masses,lengths)))\n\njxg_input:\n flatten(map(\n [ jxg_show(p,not (isnan(mass) or isnan(length))),\n jxg_set_position(p, vector(mass, length))\n ],\n [p,mass,length],\n zip(points, masses, lengths)\n ))", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"initial_sheet": "blank_spreadsheet", "correct_answer": "blank_spreadsheet", "disable_ranges": "[\"A1:C1\"]", "mark_ranges": "dict()", "marking_method": "per_cell", "tolerance": "0"}}, {"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

{plot}

"}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "filled_spreadsheet", "part": "p0", "must_go_first": true}], "variableReplacementStrategy": "alwaysreplace", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Write a formula for the length, $l$, in terms of the mass, $m$

\n

$l = $ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{k}*m", "answerSimplification": "fractionnumbers", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "m", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Product fact sheet", "extensions": ["sheets"], "custom_part_types": [{"source": {"pk": 4, "author": {"name": "Christian Lawson-Perfect", "pk": 1}, "edit_page": "/beta/part_type/4/edit"}, "name": "Spreadsheet", "short_name": "spreadsheet", "description": "

An editable spreadsheet.

", "help_url": "", "input_widget": "spread-sheet", "input_options": {"correctAnswer": "settings[\"correct_answer\"]", "hint": {"static": true, "value": ""}, "initial_sheet": {"static": false, "value": "disable_cells(settings[\"initial_sheet\"], settings[\"disable_ranges\"])"}}, "can_be_gap": true, "can_be_step": true, "marking_script": "correctAnswer:\nsettings[\"correct_answer\"]\n\nmark:\nif(sum(mark_ranges)=0,\n incorrect(),\n apply(mark_ranges)\n)\n\ninterpreted_answer:\nstudentAnswer\n\nrange_cells:\nmap(parse_range(ref),ref,values(settings[\"mark_ranges\"]))\n\ntotal_cells:\nlen(flatten(range_cells))\n\nrange_weights:\nswitch(\n settings[\"marking_method\"]=\"per_cell\",\n map(len(r)/total_cells, r, range_cells),\n // otherwise, mark per range\n repeat(1/len(range_cells), len(range_cells))\n)\n\nmark_ranges:\nmap(\n let(\n range_credit,\n sum(map(\n let(\n correctCellString, correctAnswer[c],\n correctCellNumber, parsenumber(correctCellString, notation_styles),\n studentCellString, studentAnswer[c],\n studentCellNumber, parsenumber(studentCellString, notation_styles),\n award(\n 1/len(cells), \n if(isnan(correctCellNumber) and correctCellString<>\"\",\n lower(correctCellString) = lower(studentCellString),\n abs(studentCellNumber - if(isnan(correctCellNumber),0,correctCellNumber)) <= settings[\"tolerance\"]\n )\n )\n ),\n c,\n cells\n )),\n message,\n switch(\n range_credit=0,\n if(len(cells)=1, \"This entry is incorrect.\", \"All entries in this range are incorrect.\"),\n range_credit=1,\n if(len(cells)=1, \"This entry is correct.\", \"All entries in this range are correct.\"),\n //otherwise\n \"Some entries in this range are correct.\"\n ),\n assert(len(cells)=0, add_credit(range_credit*w, \"{name}: \"+message)); \n range_credit\n ),\n [cells,w,name],\n zip(range_cells, range_weights, keys(settings[\"mark_ranges\"]))\n)\n\nnotation_styles:\n[\"plain\",\"si-en\"]", "marking_notes": [{"name": "correctAnswer", "description": "", "definition": "settings[\"correct_answer\"]"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(sum(mark_ranges)=0,\n incorrect(),\n apply(mark_ranges)\n)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "studentAnswer"}, {"name": "range_cells", "description": "", "definition": "map(parse_range(ref),ref,values(settings[\"mark_ranges\"]))"}, {"name": "total_cells", "description": "

The total number of cells to be marked.

", "definition": "len(flatten(range_cells))"}, {"name": "range_weights", "description": "", "definition": "switch(\n settings[\"marking_method\"]=\"per_cell\",\n map(len(r)/total_cells, r, range_cells),\n // otherwise, mark per range\n repeat(1/len(range_cells), len(range_cells))\n)"}, {"name": "mark_ranges", "description": "", "definition": "map(\n let(\n range_credit,\n sum(map(\n let(\n correctCellString, correctAnswer[c],\n correctCellNumber, parsenumber(correctCellString, notation_styles),\n studentCellString, studentAnswer[c],\n studentCellNumber, parsenumber(studentCellString, notation_styles),\n award(\n 1/len(cells), \n if(isnan(correctCellNumber) and correctCellString<>\"\",\n lower(correctCellString) = lower(studentCellString),\n abs(studentCellNumber - if(isnan(correctCellNumber),0,correctCellNumber)) <= settings[\"tolerance\"]\n )\n )\n ),\n c,\n cells\n )),\n message,\n switch(\n range_credit=0,\n if(len(cells)=1, \"This entry is incorrect.\", \"All entries in this range are incorrect.\"),\n range_credit=1,\n if(len(cells)=1, \"This entry is correct.\", \"All entries in this range are correct.\"),\n //otherwise\n \"Some entries in this range are correct.\"\n ),\n assert(len(cells)=0, add_credit(range_credit*w, \"{name}: \"+message)); \n range_credit\n ),\n [cells,w,name],\n zip(range_cells, range_weights, keys(settings[\"mark_ranges\"]))\n)"}, {"name": "notation_styles", "description": "", "definition": "[\"plain\",\"si-en\"]"}], "settings": [{"name": "initial_sheet", "label": "Initial sheet", "help_url": "", "hint": "A spreadsheet object giving the initial state of the sheet that the student should fill in.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "correct_answer", "label": "Correct answer", "help_url": "", "hint": "A spreadsheet object representing a correct answer to the part.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "disable_ranges", "label": "Ranges to disable", "help_url": "", "hint": "A list of cell or range references, denoting the cells that should not be editable.", "input_type": "code", "default_value": "[]", "evaluate": true}, {"name": "mark_ranges", "label": "Ranges to mark", "help_url": "", "hint": "A dictionary mapping names to cell or range references, denoting the cells that should be compared for equality with the expected answer.", "input_type": "code", "default_value": "dict()", "evaluate": true}, {"name": "marking_method", "label": "Marking method", "help_url": "", "hint": "", "input_type": "dropdown", "default_value": "per_cell", "choices": [{"value": "per_cell", "label": "Each cell has the same weight"}, {"value": "per_range", "label": "Each range has the same weight"}]}, {"name": "tolerance", "label": "Allowed margin of error", "help_url": "", "hint": "", "input_type": "code", "default_value": "0", "evaluate": true}], "public_availability": "restricted", "published": false, "extensions": ["sheets"]}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/beta/accounts/profile/1/"}, {"name": "Christian Lawson-Perfect", "profile_url": "http://clppc:8000/accounts/profile/1/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

You're considering buying a new {product_name}. The manufacturer's website contains the following information:

\n
\n

The new {product_name} does everything you need it do. Drawing only {electricity_use}W, it uses much less electricity than most towns. And invention fluid use is lower than ever, at a mere {fluid_use}ml per hour.

\n

Measuring {dimensions[0]}×{dimensions[1]}×{dimensions[2]}cm, where can't you put it?

\n

Priced affordably at {currency(price,\"£\",\"p\")}, get one today!

\n
\n

You also found some reviews online:

\n

{reviews_table}

\n

One review noted that each {product_name} incurs {currency(externalised_costs,\"£\",\"p\")} in externalised costs.

", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"raw_spreadsheet": {"name": "raw_spreadsheet", "group": "Spreadsheet", "definition": "spreadsheet_from_base64_file(safe(\"product-fact-sheet.xlsx\"), safe(\"UEsDBBQACAgIAJp0uVYAAAAAAAAAAAAAAAALAAAAX3JlbHMvLnJlbHOtks9KAzEQh+99ipB7d7YVRGSzvYjQm0h9gJjM/mE3mTAZdX17gwhaqaUHj0l+8803Q5rdEmb1ipxHikZvqlorjI78GHujnw736xu9a1fNI85WSiQPY8qq1MRs9CCSbgGyGzDYXFHCWF464mClHLmHZN1ke4RtXV8D/2To9oip9t5o3vuNVof3hJewqetGh3fkXgJGOdHiV6KQLfcoRi8zvBFPz0RTVaAaTrtsL3f5e04IKNZbseCIcZ24VLOMmL91PLmHcp0/E+eErv5zObgIRo/+vJJN6cto1cDRJ2g/AFBLBwhmqoK34AAAADsCAABQSwMEFAAICAgAmnS5VgAAAAAAAAAAAAAAAA8AAAB4bC93b3JrYm9vay54bWyNU8lu2zAQvfcrBN5tLV5qG5YDV46QAN0Qp8mZkkYWa4oUyPGWov/eEWWlKdpDDzY5C9+8mXla3pxr6R3BWKFVzMJhwDxQuS6E2sXs22M6mDHPIlcFl1pBzC5g2c3q3fKkzT7Teu/Re2VjViE2C9+3eQU1t0PdgKJIqU3NkUyz821jgBe2AsBa+lEQTP2aC8U6hIX5HwxdliKHjc4PNSjsQAxIjsTeVqKxbLUshYSnriGPN81nXhPthMuc+atX2l+Nl/F8f2hSyo5ZyaUFarTSpy/Zd8iROuJSMq/gCOE8GPcpf0BopEwqQ87W8STgZH/HW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y9zaGVldDEueG1sUEsBAhQAFAAICAgAmnS5Vk/w+XrSAAAAJQIAABoAAAAAAAAAAAAAAAAAbQ0AAHhsL19yZWxzL3dvcmtib29rLnhtbC5yZWxzUEsBAhQAFAAICAgAmnS5VrY0sqwxAQAAvwMAABQAAAAAAAAAAAAAAAAAhw4AAHhsL3NoYXJlZFN0cmluZ3MueG1sUEsBAhQAFAAICAgAmnS5VmXCbTRkAQAA2wIAABEAAAAAAAAAAAAAAAAA+g8AAGRvY1Byb3BzL2NvcmUueG1sUEsBAhQAFAAICAgAmnS5Vgpjb9D6AAAAmwEAABAAAAAAAAAAAAAAAAAAnREAAGRvY1Byb3BzL2FwcC54bWxQSwECFAAUAAgICACadLlWj/blNlkBAABXBQAAEwAAAAAAAAAAAAAAAADVEgAAW0NvbnRlbnRfVHlwZXNdLnhtbFBLBQYAAAAACQAJAD8CAABvFAAAAAA=\"))", "description": "", "templateType": "spreadsheet", "can_override": false}, "filled_spreadsheet": {"name": "filled_spreadsheet", "group": "Completed spreadsheet", "definition": "fill_ranges(raw_spreadsheet,\n [\n [\"B2\",[[product_name]]],\n [\"D2\", [[price]]],\n [\"F3:F6\", [[electricity_use],[fluid_use],[externalised_costs]]],\n [\"A5:C5\", [dimensions]],\n [\"B9:D9\", [review_counts]]\n ]\n)", "description": "", "templateType": "anything", "can_override": false}, "product_names": {"name": "product_names", "group": "Data", "definition": "[ \"Whizzo 3\", \"The New Gloop\", \"Vwlr\", \"Crumpetron\", \"Autocomb Pro\" ]", "description": "", "templateType": "list of strings", "can_override": false}, "product_name": {"name": "product_name", "group": "Data", "definition": "random(product_names)", "description": "", "templateType": "anything", "can_override": false}, "dimensions": {"name": "dimensions", "group": "Data", "definition": "repeat(random(10..100#5),3)", "description": "", "templateType": "anything", "can_override": false}, "electricity_use": {"name": "electricity_use", "group": "Data", "definition": "random(10..200#5)", "description": "", "templateType": "anything", "can_override": false}, "fluid_use": {"name": "fluid_use", "group": "Data", "definition": "random(300..900#10)", "description": "", "templateType": "anything", "can_override": false}, "externalised_costs": {"name": "externalised_costs", "group": "Data", "definition": "random(1000..9000#100)", "description": "", "templateType": "anything", "can_override": false}, "price": {"name": "price", "group": "Data", "definition": "random(59..409#10)", "description": "", "templateType": "anything", "can_override": false}, "individual_reviews": {"name": "individual_reviews", "group": "Data", "definition": "repeat(random(scores),5)", "description": "", "templateType": "anything", "can_override": false}, "all_reviewers": {"name": "all_reviewers", "group": "Data", "definition": "[ \"Invention Review\", \"Product Quarterly\", \"Whence Gizmos\", \"Doodads Today\", \"That Thingamajig\", \"Contraption Action\" ]", "description": "", "templateType": "list of strings", "can_override": false}, "reviewers": {"name": "reviewers", "group": "Data", "definition": "shuffle(all_reviewers)", "description": "", "templateType": "anything", "can_override": false}, "reviews_table": {"name": "reviews_table", "group": "Data", "definition": "table(zip(reviewers,individual_reviews),[\"Reviewer\",\"Score\"])", "description": "", "templateType": "anything", "can_override": false}, "review_counts": {"name": "review_counts", "group": "Data", "definition": "map(len(filter(x=score,x,individual_reviews)),score,scores)", "description": "", "templateType": "anything", "can_override": false}, "scores": {"name": "scores", "group": "Data", "definition": "[ \"Bad\", \"Neutral\", \"Good\" ]", "description": "", "templateType": "list of strings", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Spreadsheet", "variables": ["raw_spreadsheet"]}, {"name": "Data", "variables": ["product_names", "product_name", "dimensions", "electricity_use", "fluid_use", "externalised_costs", "price", "scores", "individual_reviews", "all_reviewers", "reviewers", "reviews_table", "review_counts"]}, {"name": "Completed spreadsheet", "variables": ["filled_spreadsheet"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "spreadsheet", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Before making a purchase, you always fill in a product fact sheet. Fill in the product fact sheet for the {product_name}, using the information above.

", "settings": {"initial_sheet": "raw_spreadsheet", "correct_answer": "filled_spreadsheet", "disable_ranges": "[\"A1:F1\", \"A2\",\"C2\",\"E2:F2\",\"A3:C3\",\"A4:C4\",\"E3:E5\",\"A7:D8\",\"A8:A9\"]", "mark_ranges": "[\n \"Product name\": \"B2\",\n \"Price\": \"D2\",\n \"Running costs\": \"F3:F5\",\n \"Dimensions\": \"A5:C5\",\n \"Reviews\": \"B9:D9\"\n]", "marking_method": "per_cell", "tolerance": "0"}}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": false, "showresultspage": "oncompletion", "navigatemode": "menu", "onleave": {"action": "none", "message": ""}, "preventleave": false, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "end_message": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/beta/accounts/profile/1/"}], "extensions": ["jsxgraph", "sheets"], "custom_part_types": [{"source": {"pk": 4, "author": {"name": "Christian Lawson-Perfect", "pk": 1}, "edit_page": "/beta/part_type/4/edit"}, "name": "Spreadsheet", "short_name": "spreadsheet", "description": "

An editable spreadsheet.

", "help_url": "", "input_widget": "spread-sheet", "input_options": {"correctAnswer": "settings[\"correct_answer\"]", "hint": {"static": true, "value": ""}, "initial_sheet": {"static": false, "value": "disable_cells(settings[\"initial_sheet\"], settings[\"disable_ranges\"])"}}, "can_be_gap": true, "can_be_step": true, "marking_script": "correctAnswer:\nsettings[\"correct_answer\"]\n\nmark:\nif(sum(mark_ranges)=0,\n incorrect(),\n apply(mark_ranges)\n)\n\ninterpreted_answer:\nstudentAnswer\n\nrange_cells:\nmap(parse_range(ref),ref,values(settings[\"mark_ranges\"]))\n\ntotal_cells:\nlen(flatten(range_cells))\n\nrange_weights:\nswitch(\n settings[\"marking_method\"]=\"per_cell\",\n map(len(r)/total_cells, r, range_cells),\n // otherwise, mark per range\n repeat(1/len(range_cells), len(range_cells))\n)\n\nmark_ranges:\nmap(\n let(\n range_credit,\n sum(map(\n let(\n correctCellString, correctAnswer[c],\n correctCellNumber, parsenumber(correctCellString, notation_styles),\n studentCellString, studentAnswer[c],\n studentCellNumber, parsenumber(studentCellString, notation_styles),\n award(\n 1/len(cells), \n if(isnan(correctCellNumber) and correctCellString<>\"\",\n lower(correctCellString) = lower(studentCellString),\n abs(studentCellNumber - if(isnan(correctCellNumber),0,correctCellNumber)) <= settings[\"tolerance\"]\n )\n )\n ),\n c,\n cells\n )),\n message,\n switch(\n range_credit=0,\n if(len(cells)=1, \"This entry is incorrect.\", \"All entries in this range are incorrect.\"),\n range_credit=1,\n if(len(cells)=1, \"This entry is correct.\", \"All entries in this range are correct.\"),\n //otherwise\n \"Some entries in this range are correct.\"\n ),\n assert(len(cells)=0, add_credit(range_credit*w, \"{name}: \"+message)); \n range_credit\n ),\n [cells,w,name],\n zip(range_cells, range_weights, keys(settings[\"mark_ranges\"]))\n)\n\nnotation_styles:\n[\"plain\",\"si-en\"]", "marking_notes": [{"name": "correctAnswer", "description": "", "definition": "settings[\"correct_answer\"]"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(sum(mark_ranges)=0,\n incorrect(),\n apply(mark_ranges)\n)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "studentAnswer"}, {"name": "range_cells", "description": "", "definition": "map(parse_range(ref),ref,values(settings[\"mark_ranges\"]))"}, {"name": "total_cells", "description": "

The total number of cells to be marked.

", "definition": "len(flatten(range_cells))"}, {"name": "range_weights", "description": "", "definition": "switch(\n settings[\"marking_method\"]=\"per_cell\",\n map(len(r)/total_cells, r, range_cells),\n // otherwise, mark per range\n repeat(1/len(range_cells), len(range_cells))\n)"}, {"name": "mark_ranges", "description": "", "definition": "map(\n let(\n range_credit,\n sum(map(\n let(\n correctCellString, correctAnswer[c],\n correctCellNumber, parsenumber(correctCellString, notation_styles),\n studentCellString, studentAnswer[c],\n studentCellNumber, parsenumber(studentCellString, notation_styles),\n award(\n 1/len(cells), \n if(isnan(correctCellNumber) and correctCellString<>\"\",\n lower(correctCellString) = lower(studentCellString),\n abs(studentCellNumber - if(isnan(correctCellNumber),0,correctCellNumber)) <= settings[\"tolerance\"]\n )\n )\n ),\n c,\n cells\n )),\n message,\n switch(\n range_credit=0,\n if(len(cells)=1, \"This entry is incorrect.\", \"All entries in this range are incorrect.\"),\n range_credit=1,\n if(len(cells)=1, \"This entry is correct.\", \"All entries in this range are correct.\"),\n //otherwise\n \"Some entries in this range are correct.\"\n ),\n assert(len(cells)=0, add_credit(range_credit*w, \"{name}: \"+message)); \n range_credit\n ),\n [cells,w,name],\n zip(range_cells, range_weights, keys(settings[\"mark_ranges\"]))\n)"}, {"name": "notation_styles", "description": "", "definition": "[\"plain\",\"si-en\"]"}], "settings": [{"name": "initial_sheet", "label": "Initial sheet", "help_url": "", "hint": "A spreadsheet object giving the initial state of the sheet that the student should fill in.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "correct_answer", "label": "Correct answer", "help_url": "", "hint": "A spreadsheet object representing a correct answer to the part.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "disable_ranges", "label": "Ranges to disable", "help_url": "", "hint": "A list of cell or range references, denoting the cells that should not be editable.", "input_type": "code", "default_value": "[]", "evaluate": true}, {"name": "mark_ranges", "label": "Ranges to mark", "help_url": "", "hint": "A dictionary mapping names to cell or range references, denoting the cells that should be compared for equality with the expected answer.", "input_type": "code", "default_value": "dict()", "evaluate": true}, {"name": "marking_method", "label": "Marking method", "help_url": "", "hint": "", "input_type": "dropdown", "default_value": "per_cell", "choices": [{"value": "per_cell", "label": "Each cell has the same weight"}, {"value": "per_range", "label": "Each range has the same weight"}]}, {"name": "tolerance", "label": "Allowed margin of error", "help_url": "", "hint": "", "input_type": "code", "default_value": "0", "evaluate": true}], "public_availability": "restricted", "published": false, "extensions": ["sheets"]}], "resources": [["question-resources/house-outline.svg", "/srv/numbas/beta/media/question-resources/house-outline.svg"]]}