Choose your answer
Anonymous Quiz
5%
[10, 9, 8, "a"]
5%
["a", 10, 9, 8]
44%
TypeError
44%
[8, 9, 10, "a"]
2%
See solution
Choose the correct way to reverse the order of the elements (the original list must be changed):
my_list = [1, 2, 3, 4]
my_list = [1, 2, 3, 4]
Anonymous Quiz
9%
print(i for i in reversed(my_list)])
7%
my_list.rev(); print(my_list)
43%
my_list.reverse(); print(my_list)
35%
print(my_list[::-1])
7%
See solution
What will this code do?
a = [1, 2, 3, 3]
b = {1, 2, 3, 3}
print(set(a) == b)
print(b == list(a))
Choose your answer:
Anonymous Quiz
15%
True True
17%
False False
54%
True False
12%
False True
2%
See solution
What will this code do?
a = 2
b = 3
d = "{a}{b}{ab}".format(a=4, b=5, ab=a*b)
print(d)
What will this code do?
a = [1, 5, 7]
b = [2, 4, 6]
c = a.extend(b)
print(c)
Choose your answer:
Anonymous Quiz
72%
[1, 5, 7, 2, 4, 6]
14%
None
4%
[3, 9, 13]
9%
[[1, 5, 7], [2, 6, 6]]
1%
See solution
What will this code do?
d = {1: 'first', 2: 'second'}
d[4]='fourth'
print(len(d))
d = {1: 'first', 2: 'second'}
d[4]='fourth'
print(len(d))
What is the value of the expression: 3^2
Anonymous Quiz
68%
9
3%
8
5%
6
2%
3
8%
2
11%
1
5%
See solution
What will this code do?
print((lambda x: print("hello", end="") or x*2)("hi"))Choose your answer
Anonymous Quiz
15%
hellohi
25%
hellohihi
17%
hihi
17%
hello
6%
hi
21%
See solution
What will this code do?
import numpy as np
a = np.array([[10, 9],[2, 8]])
print(np.min(a))
