
Linear Search
Presentation
•
Computers
•
9th - 10th Grade
•
Practice Problem
•
Medium
Chris CHA
Used 5+ times
FREE Resource
3 Slides • 7 Questions
1
2
sports = ["soccer", "hockey", "basketball", "archery"]
When data is unsorted, the sensible option when searching for a particular item is to start at the beginning and look at every item until you find the one you want. You could be lucky and find it quickly if it's near the front of the list or you may need to wait if it's near the back.
This is a LINEAR SEARCH.
3
Study this code and answer the questions on the next few slides.
Linear Search
4
Multiple Choice
What is the best description for what happens to found and index in this snippet?
They are initialised
They are evaluated
They are discarded
They are mutated
5
Multiple Choice
What is the best description of the control structures in this code snippet?
An iteration with another iteration nested inside.
A sequence of selections and a nested iteration.
An iteration with two selections inside
A selection with two iterations nested inside
6
Multiple Select
What happens to the index variable on each iteration of the REPEAT...UNTIL loop?
It's value does not change
It is used to determine which element of the list is examined
It is used to determine if there are no more elements left in the list to examine
It is increased by 1 on each iteration
7
Multiple Choice
list = ["Tim", "Kate", "Ali", "Gayle"]
If target is "Gayle", what would be the value of index when found is assigned the value True?
4
3
2
1
8
Multiple Choice
What is the best description for this selection block?
Compares index to list length to see if the loop has reached the end of the list. It will exit the loop using BREAK
Compares index to target to see if the loop has become less than the length of the list. It will BREAK from looping until the target is found.
Compares index to list length then BREAKs into another iteration and selection until the target is found.
Compares index to list length and then BREAKS the processor in half demanding that target is found.
9
Multiple Choice
What is the best description for this selection block?
If the list item at the current index is the same as the target it BREAKS out of the loop
If the list item at the current index is not the same as the target it BREAKS out of the loop and sets found to False
If the list item at the current index is the same as the target it BREAKS out of the loop and sets found to True
If the list item at the current index is the same as the target it sets found to True and then BREAKS out of the loop
10
Multiple Choice
list = ["Jim", "Barolo", "Guiseppe", "Arlan"]
If target was Barolo, what would the output be?
Target not found in the list
Target found at index index
Target found at index 0
Target found at index 1
Show answer
Auto Play
Slide 1 / 10
SLIDE
Similar Resources on Wayground
8 questions
Semicolons
Presentation
•
10th Grade
9 questions
RL.9-10.7 / RI.9-10.7
Presentation
•
9th - 10th Grade
8 questions
Chapter 9-Creating Presentations
Presentation
•
10th Grade
9 questions
Mutations
Presentation
•
9th - 11th Grade
6 questions
Conclusion - Writing Bootcamp
Presentation
•
9th - 10th Grade
7 questions
Ice Breaker: What would it be, what would you be?
Presentation
•
10th Grade
7 questions
Realidades 1 2a Listening Activity 6
Presentation
•
9th Grade
8 questions
Some British Slang
Presentation
•
9th Grade
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade