What is the biggest advantage of using a set instead of a list when checking whether an item exists?
Anonymous Quiz
20%
Sets preserve insertion order better
8%
Sets allow duplicate values
39%
Membership checks are typically much faster
33%
Sets use less memory in every situation
Why does an SSD generally make a computer feel faster than a traditional HDD?
Anonymous Quiz
9%
It has more CPU cores
79%
It accesses data much more quickly
12%
It increases RAM automatically
0%
It executes programs directly
๐1
Topic: Debugging & Code Output
๐ Quick look before the question:
๐ Quick look before the question:
x = 10
def change():
x = x + 1
print(x)
change()
What happens when this code runs?
Anonymous Quiz
61%
Prints 11
4%
Prints 10
25%
Raises an UnboundLocalError
11%
Prints 1
Which method creates a new array without modifying the original?
Anonymous Quiz
8%
push()
43%
splice()
37%
filter()
12%
pop()
Which data structure uses LIFO (Last In, First Out) order?
Anonymous Quiz
21%
Queue
64%
Stack
11%
Linked List
4%
Heap
Which statement removes a table entirely, including its structure?
Anonymous Quiz
19%
DELETE
19%
TRUNCATE
59%
DROP
4%
REMOVE
What is an API primarily used for?
Anonymous Quiz
7%
Styling a webpage
93%
Allowing different software systems to communicate with each other
0%
Compressing image files
0%
Managing hardware drivers
Which device typically connects multiple devices within the same local network?
Anonymous Quiz
47%
Router
40%
Switch
7%
Firewall
7%
Modem
Topic: Debugging & Code Output
๐ Quick look before the question:
๐ Quick look before the question:
def append_item(item, my_list=[]):
my_list.append(item)
return my_list
print(append_item(1))
print(append_item(2))
print(append_item(3))
What is printed on the third call, append_item(3)?
Anonymous Quiz
33%
[3]
50%
[1, 2, 3]
17%
[1, 3]
0%
[2, 3]
What is encapsulation in object-oriented programming?
Anonymous Quiz
0%
Writing code in fewer lines
90%
Bundling data and methods together while hiding internal details
0%
Running code in parallel
10%
Converting code between languages