
Buuble sort and 2d list Quiz
Quiz
•
Instructional Technology
•
8th Grade
•
Practice Problem
•
Medium
Kelzang Lethro
Used 3+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to swap the values of two variables, a and b, in Python?
a = b and b = a
a, b = b, a
swap(a, b)
a = b + a and b = a - b
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given a 2D list matrix = [[1, 2, 3], [4, 5, 6]], how would you access the number 5?
matrix[5]
matrix[2][1]
matrix[1][1]
matrix[0][1]
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a bubble sort algorithm, what happens during one pass through the list?
The smallest element is moved to its final position.
The list is completely sorted.
Adjacent elements are compared and swapped if they are in the wrong order.
The list is divided into two halves.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
After the first pass of a bubble sort on the list [3, 7, 2, 1], what will the list look like? (Sorting in ascending order)
[3, 2, 1, 7]
[1, 3, 7, 2]
[2, 1, 3, 7]
[3, 7, 2, 1]
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you find the number of rows in a 2D list named grid?
len(grid[0])
grid.rows()
len(grid)
grid.length
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the code: x = 10, y = 20, temp = x, x = y, y = temp. What are the final values of x and y?
x = 10, y = 20
x = 10, y = 10
x = 20, y = 20
x = 20, y = 10
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following describes the worst-case scenario for bubble sort?
The list is already sorted.
The list is sorted in reverse order.
The list contains duplicate elements.
The list has an odd number of elements.
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Scams / Schemes / Identity Theft
Quiz
•
8th Grade
20 questions
mBot Unit 1 Review
Quiz
•
4th - 8th Grade
23 questions
Quiz Hotel - FIA
Quiz
•
1st - 12th Grade
18 questions
Inventor Terminology
Quiz
•
6th - 8th Grade
16 questions
Hamm Os
Quiz
•
6th Grade - University
17 questions
Tech Troubleshooting
Quiz
•
3rd - 9th Grade
15 questions
Tower Power: Pitsco Lab
Quiz
•
6th - 8th Grade
20 questions
Woodwork Tools
Quiz
•
6th - 9th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Instructional Technology
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
15 questions
Solving Equations with Variables on Both Sides Review
Quiz
•
8th Grade
12 questions
Hallway & Bathroom Expectations
Lesson
•
6th - 8th Grade
20 questions
Solving Systems of Equations by Graphing
Quiz
•
8th Grade
20 questions
Christmas Song Emojis
Quiz
•
8th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
