WEAKLY PYTHON MILLIONAIRE DIGEST 17.10-23.10.2022
~ Topic #7 โTopics Recapโ
~ Average accuracy 38%
~ Average involvement 33 people (12%)
N.B.
๐ Be very careful while writing or reading the code - even minor mistakes can stop the program (e.g. missing parentheses, โ=โ instead of โ==โ and vice versa)
๐Keep in mind that sometimes it is necessary to convert elementsโ type in order to execute an operation (e.g. it is impossible to use len() with integer type)
๐ Use **kwargs when you want to pass a variable number keyword arguments (keys and values)
๐Pay attention to defining conditions in โwhileโ loop: it may become an infinite loop if the while condition never becomes false (e.g. while True: โฆ ; while range(x,y): โฆ ; etc.)
~ Topic #7 โTopics Recapโ
~ Average accuracy 38%
~ Average involvement 33 people (12%)
N.B.
๐ Be very careful while writing or reading the code - even minor mistakes can stop the program (e.g. missing parentheses, โ=โ instead of โ==โ and vice versa)
๐Keep in mind that sometimes it is necessary to convert elementsโ type in order to execute an operation (e.g. it is impossible to use len() with integer type)
๐ Use **kwargs when you want to pass a variable number keyword arguments (keys and values)
๐Pay attention to defining conditions in โwhileโ loop: it may become an infinite loop if the while condition never becomes false (e.g. while True: โฆ ; while range(x,y): โฆ ; etc.)
88. What will be printed when the following code is executed?
Anonymous Quiz
81%
t
12%
i
3%
h
4%
error
89. What will be printed when the following code is executed?
Anonymous Quiz
6%
VBN#CXZ*MKO!OJH!!
6%
error
11%
VBN!CXZ#MKO*OJH!!
77%
VBN#CXZ!MKO*OJH!!
90. What will be printed when the following code is executed?
Anonymous Quiz
35%
error
19%
True
45%
False
1%
Yes
91. What will be printed when the following code is executed?
Anonymous Quiz
19%
NameError
51%
50
12%
10
17%
50.0
92. What will be printed when the following code is executed?
Anonymous Quiz
8%
IndexError
61%
7
10%
infinite loop
21%
21961
93. What will be printed when the following code is executed?
Anonymous Quiz
12%
TypeError
29%
(12, 53)
49%
(3, 8)
10%
[3, 8]
94. What will be printed when the following code is executed?
Anonymous Quiz
20%
['Emma', 'Rob']
44%
['Maria', 'Emma', 'Rob']
24%
['cat', 'cat', 'mouse']
11%
['cat', 'mouse']
WEAKLY PYTHON MILLIONAIRE DIGEST 24.10-30.10.2022
~ Topic #8 โTopics Recapโ
~ Average accuracy 50%
~ Average involvement 44 people (16%)
N.B.
๐ When comparing characters or strings, Python converts the characters to their corresponding ordinal values, and then compares from left to right. The unique value of the symbol can be found using the ord() function (e.g. print("apple" > "banana") gives False, while print("apple" < "banana") gives True)
๐ Mind the data types when giving your answers. The / operator, when dividing an integer by an integer, returns a result of the float type. (e.g. 2/2 gives 1.0)
~ Topic #8 โTopics Recapโ
~ Average accuracy 50%
~ Average involvement 44 people (16%)
N.B.
๐ When comparing characters or strings, Python converts the characters to their corresponding ordinal values, and then compares from left to right. The unique value of the symbol can be found using the ord() function (e.g. print("apple" > "banana") gives False, while print("apple" < "banana") gives True)
๐ Mind the data types when giving your answers. The / operator, when dividing an integer by an integer, returns a result of the float type. (e.g. 2/2 gives 1.0)
95. What will be printed when the following code is executed?
Anonymous Quiz
19%
April
70%
May
10%
4
1%
"4"
96. What will be printed when the following code is executed?
Anonymous Quiz
9%
[โ19โ, โ3โ, โ4โ, โ77โ]
30%
[3, 4, 19, 77]
48%
341977
14%
193477