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
111. What will be printed when the following code is executed?
Anonymous Quiz
32%
95.74
41%
95.0
17%
96
10%
95.5
112. Whose last name will appear at the end of the table after the program is executed?
Anonymous Quiz
28%
Petrov
27%
Error
38%
Ivanov
7%
Romanova
WEAKLY PYTHON MILLIONAIRE DIGEST 14.11-20.11.2022
~ Topic #11 “Pandas”
~ Average accuracy 40%
~ Average involvement 14 people (5%)
N.B.
🐍Mind the syntax of pd.DataFrame() function: if you need to merge several arrays into table, plug in the list of the arrays into the function to avoid errors (e.g. pd,DataFrame([list1,list2], columns = [“first”, “second”])
🐍 pd.reset_index in pandas is used to reset index of the dataframe object to default indexing (0 to number of rows minus 1) or to reset multi level index. By doing so, the original index gets converted to a column “index”. Drop parameter helps to add or not add the old index into dataframe. By default, it adds.
~ Topic #11 “Pandas”
~ Average accuracy 40%
~ Average involvement 14 people (5%)
N.B.
🐍Mind the syntax of pd.DataFrame() function: if you need to merge several arrays into table, plug in the list of the arrays into the function to avoid errors (e.g. pd,DataFrame([list1,list2], columns = [“first”, “second”])
🐍 pd.reset_index in pandas is used to reset index of the dataframe object to default indexing (0 to number of rows minus 1) or to reset multi level index. By doing so, the original index gets converted to a column “index”. Drop parameter helps to add or not add the old index into dataframe. By default, it adds.