Python Millionare
1.02K subscribers
477 photos
1 link
Small tasks, four answers
Download Telegram
132. What will be printed when the following code is executed?
Anonymous Quiz
15%
['@box.com', '@abc.com', 'blah@']
60%
['alice@box.com', 'bob@abc.com']
15%
'alice@box.com', 'bob@abc.com', 'blah@'
10%
'alice@box.com', 'bob@abc.com'
133. What will be printed when the following code is executed?
Anonymous Quiz
22%
thinkthinkthink
43%
TypeError
25%
1.2
10%
92.1
WEAKLY PYTHON MILLIONAIRE DIGEST 5.12-11.12.2022

~ Topic #14 “Additional chapters: re”
~ Average accuracy 29%
~ Average involvement 12 people (4%)

N.B.

🐍 re.findall() returns a list of all occurrences according to the given pattern
🐍 re.match() will search the pattern and return the first occurrence at the beginning of the string
🐍 re.search() will search the pattern and return the first occurrence as well, but, unlike re.match(), it will check all the lines of the input string()
🐍 Ordinary characters (letters (a, A), digits(9)) match themselves exactly. The meta-characters(^$*+?{}[]()\|) do not match themselves, because they have special meanings (e.g. + - match 1 or more occurrences, * - 0 or more occurrences, ? - 0 or 1 occupancies of the pattern)
137. What will be the last row of the table after the program is executed?
Anonymous Quiz
47%
3 6 BobSallyScott 17020
22%
3 2.0 NaN 5673.333333
22%
3 6 NaN 17020
8%
3 6 BobSallyScott 5673.333333
138. What will be printed when the following code is executed?
Anonymous Quiz
41%
2529
36%
C2H5OH or 32=9
12%
54
10%
3
139. What will be printed when the following code is executed?
Anonymous Quiz
20%
error
51%
0,4
11%
4:0
18%
1,7
140. What will be printed when the following code is executed?
Anonymous Quiz
44%
TrueTrueTrueTrueTrue
14%
0
25%
5
18%
error
141. What will be printed when the following code is executed?
Anonymous Quiz
11%
error
21%
''
24%
'Sing with me, '
44%
'and sing it for the tear. '