What will this code do?
print(round(8.5), round(8.51), round(9.5), end = ' ')
Choose your answer
Anonymous Quiz
11%
8 8 9
17%
8 8 10
17%
8 9 9
22%
8 9 10
0%
9 9 9
28%
9 9 10
6%
See solution
What will this code do?
import copy
l = [0, 'hi', [1, 2]]
m1 = copy.deepcopy(l)
m2 = copy.copy(l)
print((l[0] is m2[0]), (l[1] is m1[1]), (l[2] is m1[2]))
Choose your answer
Anonymous Quiz
0%
True True True
33%
True True False
50%
True False False
8%
False False False
8%
False True True
0%
False False True
0%
See solution
What will this code do?
class A:
x = 1
class B(A):
pass
class C(A):
pass
A.x = 2
B.x = 3
print(B.x, C.x)
What will this code do?
from typing import Final
x: Final = 'hi'
x = 'hello'
print(x)
Choose your answer
Anonymous Quiz
23%
hi
38%
hello
8%
hi hello
8%
TypeError
0%
ValueError
23%
See solution
What will this code do?
def f(p, q):
return p + q
x = list(map(f, ('a', 'b', 'c'), ('x', 'y', 'z')))
print(x[1])