// Numbas version: finer_feedback_settings {"name": "Ball height", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Ball height", "tags": [], "metadata": {"description": "

Question asks students to find the time taken for an object thrown vertically upward from a platform to reach the ground. Set up randomly chooses environment to be on Earth, Mars or the Moon and uses appropriate acceleration due to gravity. The initial velocity of the body and height of the platform above the ground are randomly selected. In this version students are expected to write up their working and submit it seperately to the Numbas question. Students are expcted to recognise that only the positive solution has physical significance.

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

Since ground level is at \\(h=0\\) we need to solve the equation \\[\\simplify{-{a}t^2+{b}t+{c}}=0\\]

\n

Using the quadratic formula we have \\begin{align} t&=\\frac{-b\\pm\\sqrt{b^2-4ac}}{2a}\\\\&=\\frac{-\\var{b}\\pm\\sqrt{\\simplify[!collectNumbers]{{b}^2-4*{-a}*{c}}}}{\\var{-2*a}}\\\\&=\\frac{-\\var{b}+\\sqrt{\\simplify{{b}^2-4*{-a}*{c}}}}{\\var{-2*a}}\\text{ or }\\frac{-\\var{b}-\\sqrt{\\simplify{{b}^2-4*{-a}*{c}}}}{\\var{-2*a}}\\\\&=\\var{ans2}\\text{ or }\\var{ans}\\end{align}

\n

Since we can assume that \\(t\\ge 0\\) we can ignore the negative answer and conclude that the ball will reach the ground after approximately \\(\\var{precround({ans},2)}\\) seconds.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"planets": {"name": "planets", "group": "Ungrouped variables", "definition": "[\"Earth\",\"Mars\",\"the Moon\"]", "description": "

List of planets/moons used in the question. a_value variable shoud correspond with half the accelleration due to gravity on the planet.

", "templateType": "anything", "can_override": false}, "a_values": {"name": "a_values", "group": "Ungrouped variables", "definition": "[4.9,1.9,0.8]", "description": "

0.5*acceleration due to gravity on corresponding planet/moon in \"planets\" variable.

", "templateType": "anything", "can_override": false}, "select": {"name": "select", "group": "Ungrouped variables", "definition": "random(0..2)", "description": "

Selector for planet/moon to use in question. If list of bodies in \"planets\" is increased, ,ax value should be increased here as well.

", "templateType": "anything", "can_override": false}, "planet": {"name": "planet", "group": "Ungrouped variables", "definition": "planets[select]", "description": "

Selected planet/moon used in question

", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "a_values[select]", "description": "

0.5* acceleration due to gravity on selected body

", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(20..60 #5)", "description": "

Initial velocity of object being thrown in m/sec

", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(3..12)", "description": "

Height of platform from which object is thrown in m.

", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "(-b-sqrt(b^2+4*a*c))/(-2*a)", "description": "

positive root of quadratic equation, time taken for object to reach ground.

", "templateType": "anything", "can_override": false}, "ans2": {"name": "ans2", "group": "Ungrouped variables", "definition": "(-b+sqrt(b^2+4*a*c))/(-2*a)", "description": "

negative root of quadratic equation

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "ans>0", "maxRuns": 100}, "ungrouped_variables": ["planets", "a_values", "select", "planet", "a", "b", "c", "ans", "ans2"], "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": "

The height \\(h\\) (above ground level) in metres of a ball thrown vertically upward on {planet} is given by \\[h=\\simplify{-{a}t^2+{b}t+{c}}\\]where \\(t\\) is the time in seconds.

\n

Find the time taken for the ball to reach the ground. Write your final answer in the box below and show full working on your handwritten notes.

\n

\\(t=\\)[[0]]sec (round answer to 2 decimal places)

", "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": "{ans}", "maxValue": "{ans}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Don Shearman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/680/"}]}]}], "contributors": [{"name": "Don Shearman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/680/"}]}