Python Millionare
1.02K subscribers
477 photos
1 link
Small tasks, four answers
Download Telegram
71. What will be printed when the following code is executed?
Anonymous Quiz
13%
B_be_i’ll
17%
b come i’ll
44%
B_come_i'll
26%
AttributeError
72. What will be printed when the following code is executed?
Anonymous Quiz
11%
B_be_i’ll
16%
b come i’ll
56%
B_come_i'll
17%
AttributeError
73. What will be printed when the following code is executed?
Anonymous Quiz
17%
TypeError
14%
36
22%
36.0
47%
576.0
WEAKLY PYTHON MILLIONAIRE DIGEST 3.10-9.10.2022

~ Topic #5 “Methods”
~ Average accuracy 50%
~ Average involvement 30 people (11%)

N.B.

🐍Pay attention to the way the split() method creates the list - the initial element type remains (e.g. (“1,2”.split(“,”) returns [“1”, “2”], not [1, 2])
🐍Note the logic of methods layering: some methods will return the AttributeError (e.g. “X y”.split().lower() will not work, as the lower() method is used with a string, and here split() has already created a list)
75. What will be printed when the following code is executed?
Anonymous Quiz
9%
3
41%
three
45%
['three']
5%
one
78. What will be printed when the following code is executed?
Anonymous Quiz
35%
['coding', 'is', 'so', 'fun']
20%
False
37%
True
7%
error
79. What will be printed when the following code is executed?
Anonymous Quiz
13%
['pears', 'apples']
18%
200
58%
300
11%
[200, 100]