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