// Numbas version: exam_results_page_options {"name": "Calculate CPM given cost for n impressions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Calculate CPM given cost for n impressions", "tags": [], "metadata": {"description": "

Given the cost for 1, 1000, 10000 or 100000 impressions, what is the cost for 1000?

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

If it costs \\${cost} for {separateThousands(impressions,\",\")} {impstr} of an advertisment, then the CPM (cost per 1,000 impressions) is:

", "advice": "

Impressions cost \\${cost} for {separateThousands(impressions,\",\")} {impstr}

\n

So the cost for 1 impression is \\${cost} $\\div$ {separateThousands(impressions,\",\")} = \\$$\\var{CPM/1000}$

\n

So the cost for 1,000 impressions (CPM) is \\${cost} $\\div$ {separateThousands(impressions,\",\")} $\\times$ 1000 = \\$$\\var{CPM}$

\n

So the cost for 1,000 impressions (CPM) is \\${cost} $\\times$ 1,000 = \\$$\\var{CPM}$

\n

The cost for 1,000 impressions is simply \\$$\\var{cost}$

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"idx": {"name": "idx", "group": "Ungrouped variables", "definition": "random(0..3)", "description": "", "templateType": "anything", "can_override": false}, "impressions": {"name": "impressions", "group": "Ungrouped variables", "definition": "[1,1000,10000,100000][idx]", "description": "", "templateType": "anything", "can_override": false}, "impstr": {"name": "impstr", "group": "Ungrouped variables", "definition": "[\"impression\",\"impressions\",\"impressions\",\"impressions\"][idx]", "description": "", "templateType": "anything", "can_override": false}, "cost": {"name": "cost", "group": "Ungrouped variables", "definition": "random(1..9)*0.01*impressions", "description": "", "templateType": "anything", "can_override": false}, "cpm": {"name": "cpm", "group": "Ungrouped variables", "definition": "[cost*1000,cost,cost/10,cost/100][idx]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["idx", "impressions", "impstr", "cost", "cpm"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "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": "

\\$[[0]]

", "gaps": [{"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, "minValue": "CPM", "maxValue": "CPM", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "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/"}]}