Multiple choice quiz about Python - Part 7
Following the previous test set, Part 7 continues with the topic Built-in functions in Python. Let's try with Quantrimang to try the 10 questions below.
-
Question 1: What is the result of the following expression?
chr('97')
chr(97)-
a
Lỗi -
'a'
a -
Lỗi
a -
Lỗi
Lỗi
-
-
Question 2: What is the result of the following function?
complex(1+2j)-
Lỗi
-
first
-
2j
-
1 + 2j
-
-
Question 3: Where are the results of complex () function in the answers below?
-
0j
-
0 + 0j
-
0
-
Lỗi
-
-
Question 4: Divmod function (a, b) where 'a' and 'b' are integers interpreted as:
-
(a% b, a // b)
-
(a // b, a% b)
-
(a // b, a * b)
-
(a / b, a% b)
-
-
Question 5: What is the output of the representation function below?
divmod(10.5,5)
divmod(2.4,1.2)-
(2.00, 0.50)
(2.00, 0.00) -
(2, 0.5)
(2, 0) -
(2.0, 0.5)
(2.0, 0.0) -
(2, 0.5)
(2)
-
-
Question 6: Is the following statement true or false?The expression complex ('2-3j') is valid and complex ('2 - 3j') is the wrong syntax of the complex () function.
-
It's correct
-
False
-
-
Question 7: What is the result of the function shown below?
list(enumerate([2, 3]))-
Lỗi
-
[(1, 2), (2, 3)]
-
[(0, 2), (1, 3)]
-
[(2, 3)]
-
-
Question 8: What is the result of the function shown below?
x=3
eval('x^2')-
Lỗi
-
first
-
9
-
6
-
-
Question 9: What is the output of the following function?
float('1e-003')
float('2e+003')-
3.00
300 -
0.001
2000.0 -
0.001
200 -
Lỗi
2003
-
-
Question 10: Which of the following functions does not accept iterable as a parameter?
-
enumerate ()
-
all ()
-
chr ()
-
max ()
-
Was this article helpful?
Your feedback helps us improve.
Reader Comments 0
Sign in with email or Google to join the discussion.