What symbols are used to mark the start and end of a list?
Brackets []
What symbols are used at the start and end of tuples?
Parenthesis ()
What symbols are used at the start and end of sets?
Curly Brackets {}
What symbol is used in Dictionaries that is NOT used in sets?
colons :
What is the slowest Data Storage type
Lists
What is the index of 3 in this list: [3, 1, 2, 5]
0
What is the index of "a" in this tuple:
(2, 5, 3, "a", "c")
3
What is the output of this code:
a = {1,2,3,4,5,6}
print(3 in a)
True
What are the 2 parts of a dictionary?
Keys and Values
What is the length of this list: [1, 2, 3, 4, 5]
5
What is the main difference between Lists and Tuples
Tuples are immutable, they cannot be changed
What is the main use of Sets?
Quickly checking if a value is within a set
What part of a dictionary must be unique?
The key
What is the output of this code:
a = [8, 7, 6, 5, 4, 3, 2, 1, 0]
for num in a:
print(a + 2)
10, 9, 8, 7, 6, 5, 4, 3, 2
What is the output of this code:
coords = (100, 200)
coords = coords + (100)
print(coords)
ERROR
What is the most popular programming language?
JavaScript
What is the output of this code:
a = [1, 2, 3, 4, 5, 6, 7]
for i in range(len(a)):
print(a[i])
a.pop(a[i])
1, 3, 4, 6
ERROR!
What is the output of this code:
x = 100
y = 200
coords = (x,y)
y = 50
print(coords, y)
(100, 200), 50
What is it called when a list contains other lists?
2d/Multidimensional lists