
Linear Search
Presentation
•
Computers
•
9th - 10th Grade
•
Practice Problem
•
Medium
Chris CHA
Used 5+ times
FREE Resource
3 Slides • 7 Questions
1
Linear Search
2
Linear Search Algorithm
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
Linear Search
Show answer
Auto Play
Slide 1 / 10
SLIDE
Similar Resources on Wayground
7 questions
Colons & Semicolons
Presentation
•
9th - 10th Grade
9 questions
3a2|Plant vs Animal Cells
Presentation
•
9th - 10th Grade
9 questions
Area of Triangles and Parallelograms
Presentation
•
9th - 10th Grade
8 questions
Bahasa Inggris Kelas 9
Presentation
•
9th Grade
6 questions
Khởi động For While
Presentation
•
10th Grade
7 questions
Graphic technology: Affinity Designer basics
Presentation
•
9th Grade
7 questions
Unit 5, Day 4
Presentation
•
10th Grade
8 questions
Консультация
Presentation
•
9th Grade
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Assessment 2
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
12 questions
2026 TAP Technology in the Classroom
Presentation
•
Professional Development
15 questions
HCS SCI 05 Summer School Assessment 2 Review
Quiz
•
5th Grade
15 questions
HCS SCI 04 Summer School Review 2
Quiz
•
4th Grade
59 questions
Geometry Unit 3 Review
Quiz
•
9th - 12th Grade
14 questions
FAST ELA READING SMAPLE TEST MATERIALS
Passage
•
3rd Grade