// Numbas version: exam_results_page_options {"name": "Input 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "name": "Input 2", "tags": ["Fractions", "Numbas", "decimals", "fractions", "input", "introduction", "numbas", "numbers", "tolerance", "whole numbers"], "advice": "
No advice available.
", "rulesets": {}, "parts": [{"prompt": "This is an example of a randomised question - the next time you use this example you will be asked to do a different calculation.
\nFind the result of this calculation:
\n$\\var{a}\\times\\var{b}+\\var{c}=\\;$[[0]]
\nYou must input a whole number; for example, if the answer were $2$ then you could input 2
or 2.0
- try both forms.
Sometimes I could force you to enter a whole number not in decimal form. But this should be no problem as you will be warned.
\nEnter the result of this calculation, but do not enter it as a decimal.
\n$\\var{a}\\times\\var{b}+\\var{c}=\\;$[[0]]
\nEnter the correct answer as a decimal, i.e. in the form 2.0
, and see what happens.
Do not enter your answer as a decimal. Enter as a whole number without the decimal point.
", "showstrings": false, "strings": ["."], "partialcredit": 0.0}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0.0, 1.0], "showpreview": true, "vsetrangepoints": 5.0, "checkingtype": "absdiff", "marks": 1.0, "answer": "{a*b+c}", "checkvariablenames": false, "type": "jme"}], "type": "gapfill", "marks": 0.0}, {"prompt": "Many calculations will result in numbers which must be entered in decimal notation.
\nI will always ask for the decimal to be input to a certain number of decimal places.
\nOften there is a small tolerance built in so that if you get the result wrong by 1 in the last decimal place then it will be marked as correct.
\nBut accuracy is important - so make sure that you get the calculations correct.
\nFor example:
\nInput $\\displaystyle \\frac{\\var{a1}}{\\var{b1}}$ as a decimal correct to 2 decimal places here: [[0]]
\nTry putting in the correct value and submitting. Then vary the last decimal place by 1 either way and submitting, and then the last place by 2 either way and submitting.
\nTry putting in the fraction as it is (i.e. $\\var{a1}/\\var{b1}$ ) and see what happens.
\nThe system gives an error message, as what you have put in is not a decimal representation of a number. But you can always re-enter.
\nSo be careful - always check after submitting your answer that the input field contains the answer that you thought you input.
", "gaps": [{"minvalue": "{ans1-tol}", "type": "numberentry", "maxvalue": "{ans1+tol}", "marks": 1.0, "showPrecisionHint": false}], "type": "gapfill", "marks": 0.0}, {"prompt": "You will find that some questions may ask you to input fractions and not decimals.
\nFor example:
\nFind the following sum as a fraction:
\n$\\displaystyle \\frac{1}{\\var{a1}}+\\frac{1}{\\var{b1}}=\\;$[[0]]
\n(input as a fraction and not a decimal)
\nYou input the answer as {a1+b1}/{a1*b1}
.
Try inputting the decimal version of this to as many places as you like, and see what happens.
", "gaps": [{"notallowed": {"message": "Simplify into a single fraction. Do not enter as a decimal.
", "showstrings": false, "strings": ["+", "."], "partialcredit": 0.0}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0.0, 1.0], "showpreview": true, "vsetrangepoints": 5.0, "checkingtype": "absdiff", "answersimplification": "all, fractionNumbers", "marks": 1.0, "answer": "{a1+b1}/{a1*b1}", "checkvariablenames": false, "type": "jme", "musthave": {"message": "Input as a fraction.
", "showstrings": false, "strings": ["/"], "partialcredit": 0.0}}], "type": "gapfill", "marks": 0.0}, {"prompt": "As this question is in practice mode, if you click on the Reveal answers button at the bottom of the screen all the question fields are filled with the correct answers. Also, if available, there will be a full solution given under the heading Advice. Just scroll down to see this. However, there is no Advice available for this question as it is not needed.
\nFinally as you are in practice mode, if you click on the Try another question like this one button at the bottom you will get this question again but with different numbers (usually!), and you can try it again. This is true for all practice mode questions which are randomised.
", "type": "information", "marks": 0.0}], "extensions": [], "statement": "In this example we show how to enter numbers, either as whole numbers (integers), decimals (rounded to a number of decimal places), or fractions.
", "variable_groups": [], "progress": "in-progress", "type": "question", "variables": {"a": {"definition": "random(1..9)", "name": "a"}, "c": {"definition": "random(2..9)", "name": "c"}, "b": {"definition": "random(3..9)", "name": "b"}, "ans1": {"definition": "precround(a1/b1,2)", "name": "ans1"}, "a1": {"definition": "random(2,3,4,5,6,8,9,10,12)", "name": "a1"}, "b1": {"definition": "random(7,11,13)", "name": "b1"}, "tol": {"definition": 0.01, "name": "tol"}}, "metadata": {"notes": "", "description": "Details on inputting numbers into Numbas.
", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}