← QCE Digital Solutions Unit 2

Data acquisition

Capturing data from a source and bringing it into a solution in a usable form: choose the source, capture it accurately, then check it on arrival.

Understanding Data acquisition in QCE Digital Solutions Unit 2

What it does: The code names the chosen source the data will be acquired from, which is the first step of acquisition. Comparing two entries of the same value is a double entry check that helps capture the data accurately. The source must match the need. Live readings need a live source, not old data. Capturing at the source, without extra manual steps, reduces mistakes. Using a dropdown or a number field captures the data in a consistent, usable form. Checking on arrival means validating the data as soon as it enters the solution, so errors are caught early.

Common mistakes: Without brackets, f.close only names the method and never calls it, so the file stays open. It should be f.close(). A for loop header must end with a colon. It should be for line in open("a.csv"):.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 144–185) and word search (Modules 144–228).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which describes data acquisition?
Deleting old data from a database to free up spaceCapturing data from a source and bringing it into a solution in a usable form
Matches
data <- read_file("survey.csv") store(data)
↓
The data is stored straight away without being checked on arrival, so errors and missing values go into the solution.
Applying
Meanings
Term
data acquisition
Meaning
Capturing data from a source and bringing it into a solution in a usable form: choose the source, capture it accurately, then check it on arrival.
Practice
source ← "temperature sensor"
Testing
Gaps
temp
Check Answer
Spots
2lines = f.readlines()
3f.close

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Arctic Fox' badge — Tundra Tracker, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which describes data acquisition?
A. Capturing data from a source and bringing it into a solution in a usable form ✓
B. Deleting old data from a database to free up space
Data acquisition is about getting data from a source into your solution so it can be used.
2. A student is building a school canteen app. Which is the better first step in data acquisition?
A. Design the app's colour scheme
B. Choose a suitable source, such as the canteen's sales records ✓
Choosing a source comes first. You need to know where the data will come from before you can capture it.
3. Which choice of source fits this need: the current temperature at a weather station?
A. A sensor or API that gives live readings ✓
B. A survey of students done last year
The source must match the need. Live readings need a live source, not old data.
4. Which approach captures data more accurately?
A. Reading values directly from a sensor or form field as they are produced ✓
B. Retyping the values from memory later
Capturing at the source, without extra manual steps, reduces mistakes.
5. A survey form lets students type their year level as free text. What is the likely problem?
A. The data will always be perfectly consistent
B. Entries like 'Yr 11', 'eleven' and '11' will be inconsistent ✓
Using a dropdown or a number field captures the data in a consistent, usable form.

Match the Pairs

data = read_csv("sensor_log.csv") → Brings data from a chosen file source into the solution so it can be used
if reading >= 0 and reading <= 50 then → Checks the data on arrival to see if it is reasonable before accepting it
Choosing a source: the solution gets its weather data from an open data portal through an API → source <- "https://data.example.gov.au/weather"
Capturing accurately: typed survey answers are entered twice and compared → if entry1 = entry2 then accept(entry1)
data <- read_file("survey.csv") store(data) → The data is stored straight away without being checked on arrival, so errors and missing values go into the solution.
age <- input() age <- age + 1 → The input is used without confirming it is a number. Typed input is text, so the data was not captured in a usable form.

Key Term

data acquisition
Capturing data from a source and bringing it into a solution in a usable form: choose the source, capture it accurately, then check it on arrival.

Fill in the Blanks

1. print "Enter the temperature" input temp
Hint: Type the keyword that captures a value typed by the user and stores it in a variable.
2. line ← readLine(file) fields ← split(line, ",")
Hint: Type the function name that breaks a line of CSV data into separate fields.
3. if temp < -10 or temp > 50 then print "Reading rejected" end if
Hint: Type the Boolean operator that rejects a reading if either out-of-range test is true.
4. if name = "" then print "Missing value" end if
Hint: Type the comparison operator that tests whether the captured value is empty.
5. repeat input score until score >= 0 and score <= 100
Hint: Type the keyword that ends the loop once the captured data passes the check.

Spot the Error

Question 1
A f = open("temps.csv")
B lines = f.readlines()
C f.close
D print(len(lines))
Line C — Without brackets, f.close only names the method and never calls it, so the file stays open. It should be f.close().
Question 2
A data = []
B for line in open("a.csv")
C data.append(line.strip())
Line B — A for loop header must end with a colon. It should be for line in open("a.csv"):
Question 3
A age = int(input("Age: "))
B if age < 0 and age > 120:
C print("Invalid age")
Line B — No age can be below 0 and above 120 at the same time, so 'and' never catches bad data. The reasonableness check needs 'or'.
Question 4
A line = "Ava,7,Red"
B parts = line.split(",")
C year = int(parts[3])
D print(year)
Line C — The line splits into 3 fields, indexes 0 to 2, so parts[3] is out of range. The year level is in parts[1].
Question 5
A import csv
B f = open("marks.csv", "w")
C reader = csv.reader(f)
D rows = list(reader)
Line B — Mode "w" opens the file for writing and wipes the existing data. To read the source data, open it normally or with "r".

Student with a class code? Join your class →