
Unit 1 - 3.Creating a bubble sort program
Presentation
•
Computers
•
9th Grade
•
Practice Problem
•
Easy
Ala Jaber
Used 5+ times
FREE Resource
3 Slides • 14 Questions
1
2
3
Multiple Choice
Which statement best describes pseudocode?
A. Program-like planning code that isn’t executable, used to design solutions before writing them in a high-level language (e.g., Python/Java/C++)
B. Code that the operating system compiles and runs directly
C. A low-level language used to control hardware
D. A special syntax used only in Python
4
Multiple Choice
What does WHILE list is unsorted DO tell the algorithm to do?
A. Keep repeating passes until the list is sorted
B. Run exactly once
C. Compare only the first and last items
D. Stop after two passes
5
Multiple Choice
In FOR n items in list DO, what is the loop doing each pass?
A. Adding a new item to the list
B. Picking two random items to compare
C. Jumping directly to the smallest item
D. Stepping through the list positions to compare adjacent items
6
Multiple Choice
What condition triggers a swap?
A. If n < n+1
B. If n > n+1
C. If n = n+1
D. If n is the smallest value
7
Multiple Choice
When does the outer WHILE loop finish?
A. After the last index is reached
B. When the smallest item is at the front
C. When a full pass makes no swaps (list is sorted)
D. After a fixed number of passes
8
Multiple Choice
In the pseudocode, n and n+1 refer to:
A. The first and last items in the list
B. Any two random items
C. The smallest and largest items
D. Two adjacent items being compared
9
Multiple Choice
What does END FOR signify here?
A. End of the entire algorithm
B. Start of a new outer pass
C. All items for this pass have been compared
D. A swap must occur
10
11
Multiple Choice
What does bubbleSort(list) do to list?
A. Returns a new sorted copy and leaves the original unchanged
B. Randomly shuffles the items
C. Sorts the list in descending order only
D. Sorts the list in place in ascending order (no return value)
12
Multiple Choice
What is the name of the counter in the inner loop?
temp
number
n
list
13
Multiple Choice
What is the role of listChanged?
A. Counts how many swaps happen overall
B. Detects if any swap occurred in the current pass to allow early exit
C. Stores the largest value found so far
D. Tracks the current index of the inner loop
14
Multiple Choice
Why does the outer loop use range(len(list)-1, 0, -1)?
A. To compare the first and last items only
B. To iterate through all pairs twice
C. To control the number of passes, reducing the inner loop’s work each pass
D. To reverse the list before sorting
15
Multiple Choice
Given list = [7, 3, 8, 5, 6, 4], what does the program print after calling bubbleSort(list)?
A. [8, 7, 6, 5, 4, 3]
B. [3, 4, 5, 6, 7, 8]
C. [7, 3, 8, 5, 6, 4]
D. [3, 5, 4, 6, 7, 8]
16
Multiple Choice
What does if not listChanged: break achieve?
A. It restarts the algorithm from the beginning
B. It swaps the last two elements regardless of order
C. It skips the next comparison
D. It stops early after a pass with no swaps (list already sorted)
17
Multiple Choice
What does if not listChanged: break achieve?
A. It restarts the algorithm from the beginning
B. It swaps the last two elements regardless of order
C. It skips the next comparison
D. It stops early after a pass with no swaps (list already sorted)
Show answer
Auto Play
Slide 1 / 17
SLIDE
Similar Resources on Wayground
13 questions
Expressions & Equations
Presentation
•
9th Grade
13 questions
Evaluate Algebraic Expressions
Presentation
•
9th Grade
11 questions
Lesson: Solve Systems by Graphing
Presentation
•
9th Grade
11 questions
Christianity in the Roman Empire
Presentation
•
9th Grade
13 questions
Newtons law of motion
Presentation
•
9th Grade
12 questions
Electricity and Magnetism
Presentation
•
9th Grade
11 questions
Realidades 2A Reflexive Verbs
Presentation
•
9th Grade
13 questions
Ecosystems & Energy
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