How to print out a list of already installed python libraries?
Anonymous Quiz
20%
pip show
0%
pip search
0%
pip check
60%
pip list
0%
pip completion
8%
pip cache
12%
See solution
What will this code do?
d = {"id": 1, "person": {"name": "Vasya", "age": 18}}
d1 = d.copy()
d1["person"]["age"] += 1
d2 = d
d2["person"]["age"] += 1
print(d["person"]["age"])Choose your answer
Anonymous Quiz
16%
18
16%
19
58%
20
11%
TypeError
0%
AttributeError
0%
See solution
What will this code do?
d = {}
print(d.get("a", 0) + d.setdefault("a", 10) + d.get("a", 0))Choose your answer
Anonymous Quiz
12%
0
18%
10
35%
20
0%
30
12%
TypeError
12%
AttributeError
12%
See solution
What will this code do?
a = True
b= False
c = {True, False}
not b and b not in c or not a not in c
What will this code do?
keys = ["a", "b", "c", "d"]
values = [1, 2, 3, 4]
dict_ = {key: value for (key, value) in zip(keys, values)}
dict_ = {key:value for (key, value) in dict_.items() if value % 2 == 1}
sum([value for value in dict_.values()], 5)
Choose your answer
Anonymous Quiz
9%
1 2 3
22%
2 3 1
52%
3 1 2
0%
1 3 2
0%
2 1 3
13%
3 2 1
4%
See solution
Choose your answer
Anonymous Quiz
57%
True
19%
False
10%
TypeError
5%
AtributeError
5%
None
5%
See solution