GRADE 8 · COMPUTING · UNIT 1 · LESSON 1.14

Computational thinking and programming

Why software searches

Read a little. Try the workbook. Check your answers. Choose one section below to get started.

Topic 1.14 · Why software searches8 fillable worksheet pagesRead at your own pace

LET’S TRACE, REASON AND TEST

Why software searches

A search looks for a target in a collection. State the target, the inspection order and what counts as a match. Linear search can inspect unsorted data; sorting is not a requirement.

Today’s two goals
  • Compare informal search strategies and identify computing situations requiring a systematic search.
  • Explain my method and support it with a labelled trace, example or test record.
Original PaxaKids illustration for Why software searches. Use the supplied program and data models for precise workbook facts.
An original PaxaKids workbook scene. Use the supplied programs and data for precise workbook facts.

Work through an example

To find Blue in [Red, Blue, Green], inspect Red first and Blue second. Stop at the first match if that is the stated search rule.

Try before your workbook

Does a collection need to be alphabetical before a linear search can inspect every item?

Explore the clues

Tap one card to find out more.

Understand the idea

A search looks for a target in a collection. State the target, the inspection order and what counts as a match. Linear search can inspect unsorted data; sorting is not a requirement.

Concept to practise: Why software searches.

Work through an example

To find Blue in [Red, Blue, Green], inspect Red first and Blue second. Stop at the first match if that is the stated search rule.

Try before your workbook

Does a collection need to be alphabetical before a linear search can inspect every item?

Check my readiness thinking

No. A linear search follows the defined inspection order, even if the data is unsorted. The stopping and matching rules must still be clear.

Your original programs and learning models

These original PaxaKids program and data models support your workbook. Some examples deliberately contain faults to investigate. Follow their headings and preserve exact code case, punctuation and order. Traces and supplied records are not claims of physical testing.

Software needs to find items in collections

A search task needs a collection to inspect, a target to look for and a rule for deciding whether an item matches. Its instructions also need to say when to stop.

Examples include finding an equipment label in an inventory or a named file in a folder. A search can succeed, or it can finish after finding no match in the collection examined.

Identify the collection, target and match

These original C03 equipment cards form a fixed ordered collection. Positions start at 1. They are not alphabetically sorted, and lens appears twice. A first-match search must distinguish the first matching position from the label itself.
Identify the collection, target and match — original model
PositionEquipment label
1magnet
2lens
3whistle
4ruler
5compass
6lens
7torch

Prepare an original number-and-colour card set

A match requires both the target number and colour. Each swatch repeats its printed colour name. Positions shown give a fixed layout for manual practice; read rows from left to right. For a hidden-card round, copy these nine labels and mix a separate set face down.
Prepare an original number-and-colour card set — original labelled workbook model. The following text version gives its labels and values.
Prepare an original number-and-colour card set · original PaxaKids model.
Read this model’s labels and values
Labels
  1. 5 teal
  2. 4 amber
  3. 6 violet
  4. 5 amber
  5. 6 teal
  6. 4 violet
  7. 4 teal
  8. 6 amber
  9. 5 violet
Colours
  1. teal
  2. amber
  3. violet
  4. amber
  5. teal
  6. violet
  7. teal
  8. amber
  9. violet

Compare methods using the actual inspected positions

Use target 6 teal in the fixed page 3 layout.

Example P inspects positions 4, 1, 4, 5 and finds the target on its fourth inspection. Example Q inspects 1, 2, 3, 4, 5 in sequence and finds it on its fifth inspection. Count every target comparison, including a repeated inspection.
Compare methods using the actual inspected positions — original model
MethodWhat its record shows
PA repeated inspection of position 4, then a match at 5.
QA known inspection order with no repeated earlier position.

Recognise different computing search situations

A filename search needs a defined folder or other search scope and a matching rule. An inventory lookup needs a collection of records and an equipment target. A web query is more complex than a small row of cards.

Google describes crawling and organising content into an index, then searching indexed information for a query. It does not newly scan every live webpage for each query. Knowing general search advice does not guarantee first place in results.

References: Google: organising information; Google Search Central guide.
Recognise different computing search situations — original model
SituationCollection / target example
Find a saved fileChosen folder / exact filename field_notes.txt
Equipment lookupInventory labels / compass
Web researchIndexed content / keywords about a topic

Research names and check each method’s assumptions

The following short reference notes provide an offline route. Linear search, also called sequential search, checks items one at a time. Our first-match version stops on a match or after every item has been checked.

Binary search repeatedly narrows a sorted collection by comparing with a middle item. Its sorted-data assumption matters. You are researching its name and idea here; coding it is not required.

References: NIST: linear search; NIST: binary search.

For optional online research, use teacher-approved sources, record the source and date, and compare findings. Many search methods and variants exist; there is no single fixed total to memorise.

Files for this activity

Use these original PaxaKids practice files with the matching workbook. Work on a local copy in the appropriate editor. Some examples deliberately contain faults to investigate; a downloaded file is not a completed practical test.

Paxa the Fox

Try one step with Paxa!

Trace code in the stated order and preserve exact spelling and case. Use fictional data. Label a prediction, paper trace, simulator run and physical-device test separately; an unperformed test stays Pending. Save personal responses before leaving.

Our Unit 1 learning path
  1. Lesson 1.1: Recall algorithms and representations
  2. Lesson 1.2: Purpose and conventions of pseudocode
  3. Lesson 1.3: Input, output and strings
  4. Lesson 1.4: Identifiers and assignment
  5. Lesson 1.5: Arithmetic and translation
  6. Lesson 1.6: Trace and review a sequence
  7. Lesson 1.7: Conditions and two-way flow
  8. Lesson 1.8: IF THEN and indentation
  9. Lesson 1.9: IF THEN ELSE and decision diagrams
  10. Lesson 1.10: Ordered ELSEIF and fallback ELSE
  11. Lesson 1.11: Match flowchart and pseudocode branches
  12. Lesson 1.12: AND, OR and NOT
  13. Lesson 1.13: Grouping, precedence and review
  14. Lesson 1.14: Why software searches
  15. Lesson 1.15: A successful linear search
  16. Lesson 1.16: An unsuccessful search and termination
  17. Lesson 1.17: Practise and communicate the search
  18. Lesson 1.18: Translate conditions into Python
  19. Lesson 1.19: One-branch IF programs
  20. Lesson 1.20: Two-way IF ELSE programs
  21. Lesson 1.21: Ordered ELIF choices
  22. Lesson 1.22: Ranges and independent decisions
  23. Lesson 1.23: Boolean operators in Python
  24. Lesson 1.24: Design and test recommendations
  25. Lesson 1.25: Trace, debug and reflect
  26. Lesson 1.26: Choose data types and recognise Boolean literals
  27. Lesson 1.27: Set and use Boolean flags
  28. Lesson 1.28: Explain and identify constants
  29. Lesson 1.29: Express constants in three algorithm forms
  30. Lesson 1.30: Use a fixed factor in a calculation
  31. Lesson 1.31: Cast to Boolean and validate an empty response
  32. Lesson 1.32: Recall calls and trace return values
  33. Lesson 1.33: Supply parameters and reuse library code
  34. Lesson 1.34: Choose and import libraries responsibly
  35. Lesson 1.35: Round with floor and ceiling
  36. Lesson 1.36: Use pi and investigate another mathematical feature
  37. Lesson 1.37: Generate random choices within bounds
  38. Lesson 1.38: Investigate random real values and review library use
  39. Lesson 1.39: Retrieve test tables and predict selection outcomes
  40. Lesson 1.40: Decompose everyday problems
  41. Lesson 1.41: Decompose programs and organise shared work
  42. Lesson 1.42: Develop through repeated build/test cycles
  43. Lesson 1.43: Predict and verify algorithm outcomes
  44. Lesson 1.44: Choose representative and boundary tests
  45. Lesson 1.45: Build, execute and review a test plan
  46. Lesson 1.46: Recall physical inputs and compare transmission media
  47. Lesson 1.47: Configure a radio group and agree a message scheme
  48. Lesson 1.48: Send and receive numbers and strings
  49. Lesson 1.49: Trace numeric message sequences
  50. Lesson 1.50: Transmit text and use received data in conditions
  51. Lesson 1.51: Diagnose and extend a message protocol
  52. Lesson 1.52: Review communication and evidence of testing
  53. Lesson 1.53: Project 1: Adventure story
  54. Lesson 1.54: Project 2: Fire, Water, Earth
  55. Lesson 1.55: Check your progress 1
For grown-ups: using this lesson

Your answers are checked in your browser. Open responses need grown-up review and are shown separately from the automatic score. Check your work, then use “Retry answers to practise” to revisit mistakes while keeping correct responses.

Read one explanation, discuss the model and try the readiness check before the workbook. Choose “Mark lesson finished” when ready. Optional account progress saves lesson position and completion across devices; save personal responses before leaving.

2. Fill in your workbook

Read the teaching and complete workbook instructions. Choose, write or draw; Answer list offers larger controls. Trace code precisely and distinguish predictions from actual tests. Review designs, explanations and drawings with a grown-up.

Why software searches8 student pages · original artwork

Opening your PDF…

Swipe sideways across the worksheet on a small screen, or use “Answer list” for larger controls.

TAKE YOUR PRACTICE OFFLINE

3. Download the student worksheet

All 8 original A4 student pages, ready for pencil-and-paper practice. Choose Review Answers to check your work on this webpage.

Student worksheet only · PDF · 8.4 MiB · No answer key included

Download worksheet PDF ↓

TRY FIRST, THEN CHECK TOGETHER

Download the student worksheet →

4. Answers & guidance

Finished your try? Open the guide and compare one worksheet at a time. Your own words may be different and still explain the right idea.

Shown on this webpage only. There is no answer-key download, and this guide is left out when printing the page.

Show answers for all 8 worksheets

Worksheet 1

  1. Question 1: In an inventory search for lens, what is the target? the label lens
  2. Question 2: Which question must search instructions answer? when to stop after success or after exhausting the collection

Worksheet 2

  1. Question 3: At which first position does the label lens appear? 2
  2. Question 4: At which other position does lens appear? 6

Worksheet 3

  1. Question 5: In this fixed layout, which position holds 6 teal? 5
  2. Question 6: Does 6 violet match a target of 6 teal? No: the colour is different

Worksheet 4

  1. Question 7: How many comparisons does example P make? 4
  2. Question 8: How many comparisons does example Q make? 5
  3. Question 9: What can be concluded from this one example? P used fewer comparisons here, but this does not prove it is always better

Worksheet 5

  1. Question 10: Which is a justified result after checking only the first nonmatching card? that card is not the target; later cards may still match

Worksheet 6

  1. Question 11: Which named method requires sorted data in the reference note? binary search
  2. Question 12: Why does repeatedly choosing random cards need a careful stopping rule? an absent target cannot be found, and repeated choices may not exhaust the collection

Worksheet 7

  1. Question 13: Copy the nine page 3 labels to cards. Mix them face down and search freely for 6 teal; record how you actually inspected them. Mix again, then search for 4 violet with only one card visible at a time, turning it face down before viewing another. Record targets, actual inspection order, repeated positions and how you knew when to stop. Compare methods and explain how changed targets/layouts limit a speed comparison. If physical cards or a partner are unavailable, use the fixed printed layout for two clearly labelled manual traces and leave physical or peer stages Pending. Retain source introductory free/restricted search comparison through original 4/5/6 amber/teal/violet labels. Require full set, actual free method then one-visible-card restriction, record target/positions/repeats/stop evidence. Actual shuffled positions and counts depend on activity, so do not force fixed answers. In stated fixed fallback, 6 teal at 5 and 4 violet at 6; sequential counts 5/6 if that order is selected. Comparing different layouts/targets is not a controlled proof one method faster. Match both number and colour, count repeated inspections honestly and stop on found target. Record actual manual/physical/partner method and Pending stages, no numeric marks. Grown-up review; personal evidence is required.

Worksheet 8

  1. Question 14: Choose a realistic software search such as an inventory or filename lookup. Identify its collection, target, matching rule, successful result and a justified not-found stopping point. Compare the names and assumptions of linear and binary search using the page 6 notes or teacher-approved online references; record which source route you actually used. If researching online, note source titles/URLs and date, and compare findings with a partner when available. Explain why a random retry without an exhaustion rule does not justify absence. Give one useful next research question and record unavailable online or peer work as Pending. Accept realistic defined collection/target/match and stopping conditions: found on required match, not found after whole relevant finite collection examined. Distinguish value and position. Linear/sequential one-at-a-time can use unsorted data; binary requires sorted collection and narrows by middle comparisons. Offline NIST paraphrase notes are a complete route; actual online reading/date and partner comparison only if performed. Many algorithms/variants, no invented fixed total. Random repeated choice with no exhaustion rule cannot establish absent target. References relevant, one concrete next question, no account/password collection or fabricated practical evidence. Grown-up review; personal evidence is required.
Back to my workbook ↑

Curriculum & workbook reference

Computing for your homeschool day

Explore Why software searches with this free Grade 8 Computing lesson. Read one idea together, try the fillable workbook and return to review at your own pace. Download the same student worksheet PDF for pencil-and-paper practice.

Fit learning around your family’s day. There is no timer and no sign-up is needed to use the lesson. An optional account saves your lesson position and completion across devices. Workbook responses and drawings stay in this tab; save a copy of your responses before leaving.

Understand your results

Closed answers are checked in your browser. Drawings and written explanations need grown-up review and are shown separately from the automatic score. Check your work, then use “Retry answers to practise” to revisit mistakes while keeping correct responses.

Choose Review Answers after trying the activity. The guide stays on the webpage; the worksheet download contains only the student pages.

For programme background, visit the Cambridge Lower Secondary Computing overview. PaxaKids provides independent original companion practice.

Book page references identify the related teaching topic. File-management and responsible-data preparation are original PaxaKids material; orientation or contents pages are not presented as teaching citations for those skills. The explanations, characters, programs and exercises here are original PaxaKids companion practice. Practical tasks require the appropriate editor and, where applicable, suitable equipment. A design or paper trace is not a verified hardware result. Only completed, reviewed lessons are listed.

Explore the Cambridge Lower Secondary Computing curriculum for programme background. PaxaKids is an independent learning resource.