// Numbas version: exam_results_page_options {"name": "Sp\u00f8rsm\u00e5l 4", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Sp\u00f8rsm\u00e5l 4", "tags": [], "metadata": {"description": "

Given the original price of a smartphone and the rate at which it decreases, calculate its price after a given number of months. In the second part, calculate the time remaining until the price goes below a certain point.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Verdien på en smarttelefon avtar med $\\var{perc}$% hver måned. Når den ble lansert kostet den $\\var{price}$kr.

\n

", "advice": "", "rulesets": {}, "extensions": ["random_person"], "variables": {"pricee2": {"name": "pricee2", "group": "Part b)", "definition": "precround(price*((100 - perc)/100)^(testn-1),2)", "description": "", "templateType": "anything"}, "testn": {"name": "testn", "group": "Part b)", "definition": "random(6..9)", "description": "

Number of months in total.

", "templateType": "anything"}, "person": {"name": "person", "group": "Part b)", "definition": "random_person()", "description": "", "templateType": "anything"}, "perc": {"name": "perc", "group": "Part a)", "definition": "random(2..4 #0.5)", "description": "

Percentage decrease per month.

", "templateType": "anything"}, "pricee3": {"name": "pricee3", "group": "Part b)", "definition": "precround(price*((100 - perc)/100)^(testn-2),2)", "description": "", "templateType": "anything"}, "pricee1": {"name": "pricee1", "group": "Part b)", "definition": "precround(price*((100 - perc)/100)^(testn),2)", "description": "

The resulting price after the total of testn months.

", "templateType": "anything"}, "test": {"name": "test", "group": "Part b)", "definition": "precround(precround(price*((100-perc)/100)^5, 2)*((100-perc)/100)^(n-5), 2)", "description": "

Calculated value of price2 to ensure we mention rounding errors in advice only when needed.

", "templateType": "anything"}, "price2": {"name": "price2", "group": "Part b)", "definition": "if(pricee2 < threshold, pricee2, pricee1)", "description": "", "templateType": "anything"}, "price": {"name": "price", "group": "Part a)", "definition": "random(6000..8000 #100) ", "description": "

The original price.

", "templateType": "anything"}, "threshold": {"name": "threshold", "group": "Part b)", "definition": "siground(pricee1+5,2)", "description": "", "templateType": "anything"}, "n": {"name": "n", "group": "Part b)", "definition": "if(pricee2 < threshold, testn-1, testn)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": "1000"}, "ungrouped_variables": [], "variable_groups": [{"name": "Part a)", "variables": ["price", "perc"]}, {"name": "Part b)", "variables": ["threshold", "pricee1", "pricee2", "pricee3", "testn", "test", "price2", "n", "person"]}], "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": "

Hvor mye er smarttelefonen verdt én måned etter lansering?

\n

Svar: [[0]]  Avrund svaret til 2 desimaler 

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "precround(price*((100-perc)/100), 2)", "maxValue": "precround(price*((100-perc)/100), 2)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": "100", "precisionMessage": "

Avrundning til $2$ desimaler.

", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"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": "

Hvor mye er smartphonen verdt fem måneder etter lansering?

\n

Avrund svaret til 2 desimaler. Bruk punktum for desimaltegn. Skriv f.eks. 2300.3 for å betegne 2300,3

\n

Svar: [[0]]  Avrund svaret til 2 desimaler  

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "precround(price*((100-perc)/100)^5, 2)", "maxValue": "precround(price*((100-perc)/100)^5, 2)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": "100", "precisionMessage": "

Avrundning til $2$ desimaler.

", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ida Landg\u00e4rds", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2336/"}]}]}], "contributors": [{"name": "Ida Landg\u00e4rds", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2336/"}]}