Question 1 of 25
Hints left: 3
Q1
What will be the output of the following Python function? complex(1+2j)
Q2
What will be the output of the following Python function? all([2,4,0,6])
Q3
What is the output of the following code: my_list = [1, 2, 3, 4] print(sum(my_list))
Q4
What is the output of the following code: my_list = [1, 2, 3] print(list(reversed(my_list)))
Q5
What will be the output of the following code: my_string = "Hello, World!" print(my_string.lower())
Q6
What does the built-in function chr() do in Python?
Q7
What will be the output of the following Python function? float(' -12345\n') (Note that the number of blank spaces before the number is 5)
Q8
What is the output of the function complex()?
Q9
Which built-in function is used to calculate the length of a sequence like a list or string?
Q10
What will be the output of the following code: my_string = " Hello, World! " print(my_string.strip())
Q11
What is the output of the following code: my_list = [5, 8, 2, 6] print(max(my_list))
Q12
What will be the output of the following Python function? all(3,0,4.2)
Q13
What is the output of the following code: my_list = [3, 1, 4, 1] print(sorted(my_list))
-
A
-
B
-
C
-
D
Q14
Which built-in function is used to convert a value to a string?
Q15
What will be the output of the following Python function? oct(7) oct(‘7’)
Q16
What will be the output of the following Python functions? x=3 eval('x^2')
Q17
Which of the following functions does not throw an error?
Q18
What will be the output of the following Python function? ord(65) ord(‘A’)
Q19
What will be the output of the following Python function? list(enumerate([2, 3]))
Q20
What does the built-in function type() do in Python?
Q21
What will be the output of the following Python functions? float('1e-003') float('2e+003')
Q22
What is the purpose of the built-in function ord()?
Q23
What will be the output of the following Python function? len(["hello",2, 4, 6])
Q24
Which of the following functions does not necessarily accept only iterables as arguments?
Q25
What will be the output of the following Python functions? chr(‘97’) chr(97)