// Numbas version: exam_results_page_options {"name": "PHY1030 Python assignment", "extensions": ["linear-algebra", "stats"], "custom_part_types": [{"source": {"pk": 124, "author": {"name": "Chris Graham", "pk": 369}, "edit_page": "/part_type/124/edit"}, "name": "Have you submitted your answer to Canvas?", "short_name": "have-you-submitted-your-answer-to-canvas", "description": "

Have you submitted your answer to Canvas?

", "help_url": "", "input_widget": "checkboxes", "input_options": {"correctAnswer": "[True]", "hint": {"static": true, "value": ""}, "choices": {"static": true, "value": ["I have written an answer to submit through Canvas"]}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\nset_credit(0,'This will be marked later.')\n\n\ninterpreted_answer:\nstudentAnswer", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "set_credit(0,'This will be marked later.')\n"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "studentAnswer"}], "settings": [{"name": "message", "label": "message", "help_url": "", "hint": "", "input_type": "html", "default_value": "

A message

", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "PHY1030 Python assignment", "tags": [], "metadata": {"description": "

A random dataset given by a linear function with noise (gradient and y-intercept of the linear function are randomised as is distribution of x values).

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

Suppose that you have recorded the following experimental data:

\n

{table([[\"Pressure, Pa\"] + xs,[\"Force, N\"] + ys,[\"Measurement error, N\"] + es])}

\n

Submit the following documents to Canvas:

\n
    \n
  1. An image file (.pdf, .png, or .jpg) containing a plot of the data together with a line of best fit (on the same axes).
  2. \n
  3. A .txt or .csv file containing the data plotted and analysed.
  4. \n
  5. A .py file containing the code used to plot and analyse the data.
  6. \n
  7. A .txt file containing the fitting parameters (the gradient and y-intercept of the line of best fit) and the uncertainties in these parameters.
  8. \n
\n

Important information:

\n", "advice": "", "rulesets": {}, "extensions": ["linear-algebra", "stats"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"xs": {"name": "xs", "group": "Ungrouped variables", "definition": "repeat(precround(random(1..100#0),3), n)", "description": "

X values. Chosen uniformly at random within a range.

", "templateType": "anything", "can_override": false}, "ys": {"name": "ys", "group": "Ungrouped variables", "definition": "map(\n precround(gradient*x + intercept + normalsample(0,noise_variance), 3),\n x,\n xs\n)", "description": "

Y values. They have a linear relationship with X, plus some normally-distributed noise. The values are rounded to 3 d.p.

", "templateType": "anything", "can_override": false}, "gradient": {"name": "gradient", "group": "Ungrouped variables", "definition": "random(1..4#0.1)", "description": "

The gradient of Y with respect to X.

", "templateType": "anything", "can_override": false}, "intercept": {"name": "intercept", "group": "Ungrouped variables", "definition": "random(30..50)", "description": "

The $y$-intercept of the line.

", "templateType": "anything", "can_override": false}, "noise_variance": {"name": "noise_variance", "group": "Ungrouped variables", "definition": "5^2", "description": "

The variance of the noise.

", "templateType": "anything", "can_override": false}, "es": {"name": "es", "group": "Ungrouped variables", "definition": "repeat(precround(random(1..10#0),3), n)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "30", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["xs", "ys", "gradient", "intercept", "noise_variance", "es", "n"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "have-you-submitted-your-answer-to-canvas", "useCustomName": false, "customName": "", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"message": "

A message

"}}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Will Rushworth", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/20560/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Will Rushworth", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/20560/"}]}