Skip to content

Commit ce3600d

Browse files
committed
update lab test 3
1 parent 0d74187 commit ce3600d

4 files changed

Lines changed: 83 additions & 0 deletions

File tree

docs/.vitepress/config.mts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export default defineConfig({
2121
items: [
2222
{ text: 'Lab Test 1', link: '/assessments/lab-test-1' },
2323
{ text: 'Lab Test 2', link: '/assessments/lab-test-2' },
24+
{ text: 'Lab Test 3', link: '/assessments/lab-test-3' },
2425
{ text: 'Assignment', link: '/assessments/assignment' }
2526
],
2627
activeMatch: '^/assessments/'
@@ -98,6 +99,10 @@ export default defineConfig({
9899
text: 'Lab Test 2',
99100
link: '/assessments/lab-test-2'
100101
},
102+
{
103+
text: 'Lab Test 3',
104+
link: '/assessments/lab-test-3'
105+
},
101106
{
102107
text: 'Assignment',
103108
link: '/assessments/assignment'

docs/assessments/lab-test-3.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Lab Test 3
2+
3+
## Instructions
4+
5+
**Time Limit:** 60 minutes
6+
**Software Required:** **Python (VS Code)**
7+
**Submission:** Upload Python file (.py) to Google Form
8+
9+
### Rules
10+
- No phones or AI tools allowed
11+
- No collaboration with other students
12+
- Must use Python only
13+
14+
15+
### Submission Process
16+
1. Complete your Python program
17+
2. Save the file as: `lab-test-3.py`
18+
3. Upload the file to the Google Form:
19+
- **C01:** [Click here](https://forms.gle/zfSRwUb2k1EcQzqg7)
20+
- **C02:** [Click here](https://forms.gle/FU6howfLoAiRbNh9A)
21+
4. Fill in all required information in the form
22+
23+
### What to Submit
24+
- Python file named `lab-test-3.py`
25+
- Ensure the program runs without errors
26+
27+
28+
29+
# Questions
30+
31+
## Topic 3: File Handling (CSV)
32+
33+
### Learning Objective
34+
35+
(p) Construct a Python program using CSV file handling with control structures
36+
37+
---
38+
39+
### Required File
40+
41+
**Download the `bmi.csv` file:** [Download here](../bmi.csv)
42+
43+
---
44+
45+
### Question
46+
47+
Create a program with **TWO functions** that performs the following tasks:
48+
49+
#### Section 1 (Function 1)
50+
1. Open the CSV file and **print all of its content** to the console
51+
2. **Calculate and display the average height** in the dataset
52+
53+
#### Section 2 (Function 2)
54+
1. **Add your own data** (Gender, Height, Weight, and BMI Index) to the file using standard input
55+
2. **Close the file**
56+
3. **Re-read the file** to verify that the new row has been successfully added
57+
58+
59+
60+
61+
### Rubric
62+
63+
<img src="/assessments/lab-test-3-rubric.png" alt="Lab Test 3 Rubric" width="100%">
64+
65+
---
66+
67+
Good luck

docs/public/assessments/bmi.csv

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Gender,Height,Weight,BMI
2+
Male,175,70,22.9
3+
Female,162,55,21.0
4+
Male,180,85,26.2
5+
Female,158,50,20.0
6+
Male,172,68,23.0
7+
Female,165,60,22.0
8+
Male,178,75,23.7
9+
Female,160,52,20.3
10+
Male,185,90,26.3
11+
Female,170,65,22.5
47.5 KB
Loading

0 commit comments

Comments
 (0)