Python в тестах
3.17K subscribers
232 photos
25 links
Тесты по языку Python. Никакой воды.

@anothertechrock
Download Telegram
What will be the output?
print(.1 + .1)
Anonymous Quiz
2%
2
23%
.2
58%
0.2
15%
Error
2%
Check answer
👍1
What will be the output?
print(complex(1.1) + 6j)
Anonymous Quiz
4%
1.7
10%
7.1
63%
(1.1) + 6j
15%
Error
8%
Check answer
👍1
What method exists to add to string?
Anonymous Quiz
14%
insert
24%
add
4%
push
30%
append
24%
none
3%
Check answer
👍1
What will be the output?
print(hex(int('A', 16) + 5))
Anonymous Quiz
7%
15
31%
0xf
12%
F
14%
21
26%
Error
10%
Check answer
👍1
What will be the output?
print(0,5 * 8)
Anonymous Quiz
52%
4
22%
0, 40
10%
0 40
13%
Error
2%
Check answer
1👍1
Which of that can't the sorted function take as an argument?
Anonymous Quiz
17%
str
21%
tuple
15%
dict
21%
set
19%
All
6%
Check answer
👍1
Which operation is the highest priority among the listed?
Anonymous Quiz
12%
& (Bitwise AND)
14%
- (Unary minus)
41%
** (exponentiation)
27%
not (Logical negation)
7%
Check answer
👍1
What will be the output?
s = [1, 9, 5]
print(s, s.sort())
Anonymous Quiz
18%
[1, 9, 5] None
11%
[1, 5, 9] None
66%
[1, 9, 5] [1, 5, 9]
4%
[1, 5, 9] [1, 9, 5]
1%
Check answer
🦄1
What data type is mutable?
Anonymous Quiz
17%
bytes
40%
bytearray
30%
both mutable
13%
Check answer
👍1
What will be the output?
print(4 ^ 2)
Anonymous Quiz
5%
4
16%
6
47%
16
26%
Error
5%
Check answer
😁2
Which attribute integer variable hasn't?
Anonymous Quiz
18%
real
33%
imag
10%
abs
23%
denominator
15%
Check answer
🦄1
What will be the output?
print(6 > 5 > 4)
Anonymous Quiz
71%
True
7%
False
13%
True True
7%
Error
2%
Check answer
👍1
🦄1
👍1
What will be the output?
print(b'1' == '1')
Anonymous Quiz
28%
True
35%
False
32%
Error
5%
Check answer
🦄1
Which function overloads the + operator?
Anonymous Quiz
60%
__add__()
10%
__plus__()
21%
__sum__()
10%
None of the mentioned
👍1