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
What will this code do?
import time
my_time = time.strptime("Mon Feb 22 10:55:00 2021")
my_time = time.strftime("%d.%m.%Y", my_time)
print(my_time)
What will this code do?
import time
time.asctime((2021, 2, 23, 12, 0, 0, 1, 0, 0))
What will this code do?
def f(**x):
return sum(x.values())
s = f(a=1, b=2) + f(x=2, y=1, z=0)
print(s)
Choose your answer
Anonymous Quiz
0%
(1, 2, 2, 1, 0)
0%
{"a":1, "b":2, "x":2,"y":1, "z":0}
0%
3
94%
6
6%
{1, 2, 2, 1, 0}
0%
0
0%
See solution
What will this code do?
x = (i**2 for i in range(1, 100) if not i % 3)
y = (i for i in x if not i % 5)
print(next(y))
What will this code do?
import hashlib
m = hashlib.sha256()
m.update(b"hello")
print(m.digest_size, len(m.hexdigest()))
Choose your answer
Anonymous Quiz
0%
5 5
0%
5 10
13%
32 32
25%
32 64
63%
256 256
0%
256 512
0%
See solution
What will this code do?
import datetime
t1 = datetime.date(2021, 3, 5) - datetime.date(2021, 2, 23)
t2 = datetime.date(2020, 3, 5) - datetime.date(2020, 2, 23)
print((t2 - t1).days)
Choose your answer
Anonymous Quiz
0%
-1
55%
0
18%
1
0%
5
0%
10
0%
11
0%
23
18%
ValueError
0%
TypeError
9%
See solution
What is the largest integer that can be in a variable?
Anonymous Quiz
12%
2**32 - 1
27%
2**64 - 1
0%
2**52 - 1
12%
2**256 - 1
12%
2**1024 - 1
38%
Limited only by computer memory
What will this code do?
class A:
def f(self):
print('A', end="")
class B:
def f(self):
print('B', end="")
class C(A):
def f(self):
print("C", end="")
super().f()
self.__class__.__bases__ = (B,)
x = C()
_ = x.f(), x.f()