102. What will be printed when the following code is executed?
Anonymous Quiz
17%
Error
48%
True
34%
False
1%
"false"
103. What will be printed when the following code is executed?
Anonymous Quiz
31%
NameError
20%
42
20%
55
30%
infinite loop
104. What will be printed when the following code is executed?
Anonymous Quiz
19%
5
67%
5.0
10%
4.75
3%
4.5
105. What will be printed when the following code is executed?
Anonymous Quiz
38%
error
17%
[“11”, “44”, “99”]
6%
[1, 2, 3]
38%
[1, 16, 81]
106. What will be printed when the following code is executed?
Anonymous Quiz
5%
3
52%
[“hehe”]
24%
“hehe”
19%
“hello”
107. What will be printed when the following code is executed?
Anonymous Quiz
57%
['ztuebs', 'jkyfmo', 'dhkpq']
13%
['70:ztuebs', '0:jkyfmo', '54:dhkpq']
7%
['54:dhkpq']
23%
['dhkpq', 'jkyfmo', 'ztuebs']
108. What will be printed when the following code is executed?
Anonymous Quiz
10%
['70:ztuebs', '0:jkyfmo', '54:dhkpq']
62%
{70: 'ztuebs', 0: 'jkyfmo', 54: 'dhkpq'}
27%
{54: 'jkyfmo'}
2%
{'54:dhkpq'}
WEAKLY PYTHON MILLIONAIRE DIGEST 7.11-13.11.2022
~ Topic #10 “Functions”
~ Average accuracy 45%
~ Average involvement 14 people (5%)
N.B.
🐍 * and ** in the function definition are the unpacking operators
🐍 *args (Non-Keyword Arguments) allows you take in more arguments than the number of formal arguments that you previously defined (e.g. a multiply function that takes any number of arguments and is able to multiply them all together)
🐍 **kwargs (Keyword Arguments) is used to pass a keyworded argument list where you provide a name to the variable as you pass it into the function, the same way a dictionary maps each keyword to the value that we pass alongside it
🐍 It is possible to use the functions you created in the code text of another function’s definition
~ Topic #10 “Functions”
~ Average accuracy 45%
~ Average involvement 14 people (5%)
N.B.
🐍 * and ** in the function definition are the unpacking operators
🐍 *args (Non-Keyword Arguments) allows you take in more arguments than the number of formal arguments that you previously defined (e.g. a multiply function that takes any number of arguments and is able to multiply them all together)
🐍 **kwargs (Keyword Arguments) is used to pass a keyworded argument list where you provide a name to the variable as you pass it into the function, the same way a dictionary maps each keyword to the value that we pass alongside it
🐍 It is possible to use the functions you created in the code text of another function’s definition
109. What will be the last row of the created table when the following code is executed?
Anonymous Quiz
18%
0 95.94 95.89 891700
15%
open close volume
34%
ValueError will appear
33%
1 95.00 95.59 752500
110. What will the column named "index" contain when the following code is executed?
Anonymous Quiz
14%
1 2 1 2
41%
0 1 0 1
38%
0 1 2 3
7%
1 2 3 4