// Numbas version: exam_results_page_options {"name": "Calculate the number of impressions bought", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Calculate the number of impressions bought", "tags": [], "metadata": {"description": "

Given a campaign budget and a CPM, calculate the number of impressions.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

{name} (a media agency buyer) spent \\${formatnumber(campaign,\"si-en\")} on a campaign and paid \\${CPM} CPM (cost per thousand) for display banner ads.  

", "advice": "

For every \\${CPM} we spend, we buy 1,000 impressions (viewings).

\n

We need to calculate how many lots of 1,000 viewings we can buy with \\${formatnumber(campaign,\"si-en\")}.

\n

This is \\${formatnumber(campaign,\"si-en\")} $\\div$ \\${CPM} = {separateThousands(floor(impressions)/1000,\",\")}

\n

This is the number of thousands of impressions.

\n

To get the number of impressions we multiply by 1 000.

\n

Number of impressions = {separateThousands(floor(impressions)/1000,\",\")} $\\times$ 1000= {separateThousands(floor(impressions),\",\")}

", "rulesets": {}, "extensions": ["random_person"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"person": {"name": "person", "group": "Ungrouped variables", "definition": "random_person()", "description": "", "templateType": "anything", "can_override": false}, "name": {"name": "name", "group": "Ungrouped variables", "definition": "person['name']", "description": "", "templateType": "anything", "can_override": false}, "their": {"name": "their", "group": "Ungrouped variables", "definition": "person[\"pronouns\"][\"their\"]", "description": "", "templateType": "anything", "can_override": false}, "theirs": {"name": "theirs", "group": "Ungrouped variables", "definition": "person['pronouns']['theirs']", "description": "", "templateType": "anything", "can_override": false}, "them": {"name": "them", "group": "Ungrouped variables", "definition": "person[\"pronouns\"][\"them\"]", "description": "", "templateType": "anything", "can_override": false}, "they": {"name": "they", "group": "Ungrouped variables", "definition": "person[\"pronouns\"][\"they\"]", "description": "", "templateType": "anything", "can_override": false}, "themself": {"name": "themself", "group": "Ungrouped variables", "definition": "person[\"pronouns\"][\"themself\"]", "description": "", "templateType": "anything", "can_override": false}, "neutral": {"name": "neutral", "group": "Ungrouped variables", "definition": "person['gender']='neutral'", "description": "", "templateType": "anything", "can_override": false}, "s": {"name": "s", "group": "Ungrouped variables", "definition": "if(neutral,'','s')", "description": "", "templateType": "anything", "can_override": false}, "campaign": {"name": "campaign", "group": "Ungrouped variables", "definition": "random(1..100)*10000", "description": "

The amount spent on the advertising campaign

", "templateType": "anything", "can_override": false}, "CPM": {"name": "CPM", "group": "Ungrouped variables", "definition": "random(1..100)", "description": "

cost per 1000 displays

", "templateType": "anything", "can_override": false}, "impressions": {"name": "impressions", "group": "Ungrouped variables", "definition": "campaign/CPM*1000", "description": "

the number of impressions purchased.

", "templateType": "anything", "can_override": false}, "maximpressions": {"name": "maximpressions", "group": "Ungrouped variables", "definition": "ceil(impressions)", "description": "", "templateType": "anything", "can_override": false}, "minimpressions": {"name": "minimpressions", "group": "Ungrouped variables", "definition": "floor(impressions)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["person", "name", "their", "theirs", "them", "they", "themself", "neutral", "s", "campaign", "CPM", "impressions", "maximpressions", "minimpressions"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "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": "

How many impressions would {they} have bought?

\n

Give the whole number part of your answer. Discard any decimal part.

", "minValue": "maximpressions", "maxValue": "minimpressions", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Susan McGlynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2148/"}, {"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Susan McGlynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2148/"}, {"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}