The school trip list
Your class plans a trip. Ms Okafor has a messy list: names in any order, some prices, some students who have not paid.
She needs three things. A tidy list. The total cost. How many students have paid.
She does not collect new data. She changes the data she has. That is called transforming data.
Key words
| Word | What it means | Example |
|---|---|---|
| Transform | Change data so that it is more useful. | Sort a list by price |
| Manipulate | Change the shape or order of data: sort it, filter it, or join it. | Keep only students who paid |
| Analyse | Look at data to find out what it says. | Find the average price |
| Process | Take input, do a set of steps on it, and give output. | Turn a list of prices into one total |
| Average | The total divided by how many items there are. | 60 divided by 3 is 20 |
| Percentage | A number out of every 100. | 75 out of every 100 |
| Filter | Keep only the rows that fit a rule. | Prices under £15 |
| Sort | Put items in an order. | Smallest price first |
The cells students fill in are left blank in this preview.
Try it: manipulate a list
prices = [12.5, 5.0, 20.0, 8.0, 15.0]
print("Original:", prices)
prices.sort()
print("Sorted:", prices)
cheap = []
for price in prices:
if price < 15:
cheap.append(price)
print("Under 15:", cheap)
# Change 15 to 10 and run it again.
Manipulating: change the shape
Manipulating data means changing how it looks or where it sits. You do not find out anything new.
You can sort a list. You can filter it to keep only some rows. You can join two lists into one, or change "5" typed as text into the number 5. The facts stay the same.
Analysing: find out what it says
Analysing means looking at data to learn something new. You count, add up, and compare.
The total of the prices is one answer. The average is another. The percentage of students who paid is a third. Analysis turns many numbers into a few useful ones.
Worked example: total and average
| Step | What you do | Result |
|---|---|---|
| 1 | Write the prices | 10, 20, 30 |
| 2 | Add them up | 10 + 20 + 30 = 60 |
| 3 | Count them | 3 prices |
| 4 | Divide the total by the count | 60 divided by 3 = 20 |
| Answer | The average price | £20 |
The cells students fill in are left blank in this preview.
Quick check: which way?
Have a go
Quick check: which way?
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
Worked example: a percentage
| Step | What you do | Result |
|---|---|---|
| 1 | Count the students who paid | 15 |
| 2 | Count all the students | 20 |
| 3 | Divide paid by all | 15 divided by 20 = 0.75 |
| 4 | Multiply by 100 | 0.75 times 100 = 75 |
| Another way | 20 goes into 100 five times, so multiply both numbers by 5 | 15 times 5 = 75 and 20 times 5 = 100 |
| Answer | A percentage is out of every 100 | 75 out of every 100 have paid |
The cells students fill in are left blank in this preview.