Python Millionare
1.02K subscribers
477 photos
1 link
Small tasks, four answers
Download Telegram
45. What will be printed when the following code is executed?
Anonymous Quiz
72%
i
19%
t
7%
error
2%
e
WEAKLY PYTHON MILLIONAIRE DIGEST 5-11.09.2022

~ Topic #1 “Getting Started with Python Programming”
~ Average accuracy 48%
~ Average involvement 56 people (32%)

N.B.

🐍 You can't square a string or multiply two strings
🐍 When using the "+" operator with strings, concatenation occurs - combination of strings into one
🐍 TypeError occurs when the data type of objects in an operation is inappropriate
(e.g. multiplying a string to a float)
🐍 SyntaxError is a mistake in the use of the Python language (e.g. missing parenthesis)
🐍 The numbering of elements starts from 0 from left to right and from -1 from right to left
46. What will be printed when the following code is executed?
Anonymous Quiz
8%
6
4%
1
69%
2
19%
ValueError
47. What will be printed when the following code is executed?
Anonymous Quiz
9%
28
7%
NameError
73%
-28
11%
TypeError
48. What will be printed when the following code is executed?
Anonymous Quiz
5%
error
5%
minus
5%
middle
85%
plus
49. What will be printed when the following code is executed?
Anonymous Quiz
2%
divisible by
50%
divisible by 3 and 5
43%
SyntaxError
5%
divisible by 5
50. What will be printed when the following code is executed?
Anonymous Quiz
4%
divisible by 3
78%
divisible by 3 and 5
13%
SyntaxError
5%
divisible by 5
51. What will be printed when the following code is executed?
Anonymous Quiz
3%
Hi
13%
True
5%
false
79%
False
52. What will be printed when the following code is executed?
Anonymous Quiz
45%
False
6%
false
21%
true
28%
Hi
WEAKLY PYTHON MILLIONAIRE DIGEST 12-18.09.2022

~ Topic #2 “Boolean data type and conditional operator”
~ Average accuracy 67%
~ Average involvement 80 people (33%)

N.B.

🐍 If you want to specify multiple conditions (using AND or OR), you should specify the variable to which the condition applies in each case (e.g. “if (a > 1) and (a % 2 == 0) …”)
🐍It is possible to use boolean data type to specify a condition (e.g. “if True…”)
🐍 An empty variable (string, list, etc.) counts as False, all other variables count as True
53. What will the program output after sequential input "5", "6", "7", "break" without quotes?
Anonymous Quiz
10%
"567"
10%
4
36%
infinite loop
45%
3