Python Quiz
486 subscribers
867 photos
727 links
🎓 Python-викторины для программистов.
Каждый день новая задача, разбор и неожиданные фишки языка.
Download Telegram
In Python, what is the default maximum level of recursion?
Anonymous Quiz
7%
500
17%
1000
15%
10000
61%
There is no default maximum level
Which code snippet below will not return True?
Anonymous Quiz
13%
1 in [1,0]
26%
1 in [1,0] == True
47%
(1 in [1,0]) == True
13%
1 in [1, 2, 3]
What is the output of the following code?
eval(''1 + 3 * 2'')
Anonymous Quiz
10%
‘1+6’
9%
‘4*2’
31%
‘1+3*2’
50%
7
Which one is NOT a legal variable name?
Anonymous Quiz
12%
Myvar
49%
my-var
11%
my_var
28%
_myvar
👍1
How do you create a variable with the numeric value 5?
Anonymous Quiz
21%
x = int(5)
31%
x = 5
48%
Both the other are correct
Which collection is ordered, changeable, and allows duplicate members?
Anonymous Quiz
10%
SET
67%
LIST
14%
TUPLE
10%
DICTIONARY
Which is invalid in python for z = 5 ?
Anonymous Quiz
37%
z = z++
40%
z = ++z
12%
z += 1
12%
z -= 1
Which method can be used to return a string in upper case letters?
Anonymous Quiz
58%
upper()
18%
upperCase()
18%
uppercase()
7%
ToUpperCase()
What is the correct syntax to output the type of a variable or object in Python?
Anonymous Quiz
9%
print(typeOf(x))
77%
print(type(x))
5%
print(typeof x)
9%
print(typeof(x))
The `minsplit` parameter to split() specifies the minimum number of splits to make to the input string.
Anonymous Quiz
75%
True
25%
False
What is the value of x
Anonymous Quiz
20%
101
21%
99
19%
What is the value of x
41%
100
🤯4
What is the output of the following function call
Anonymous Quiz
18%
5
35%
15
21%
(5, 15)
26%
Syntax Error
👍1
Choose the correct function declaration of fun1() so that we can execute the function call successfully
Anonymous Quiz
20%
def fun1(**kwargs)
19%
No, it is not possible in Python
27%
def fun1(args*)
33%
def fun1(*data)
👍2