What will be the output of the following Python function?
all([2,4,0,6])
Select an option to see the answer and solution.
What will be the output of the following Python functions?
x=3
eval('x^2')
Select an option to see the answer and solution.
What is the purpose of the built-in function ord()?
Select an option to see the answer and solution.
What will be the output of the following Python function?
min(max(False,-3,-4), 2,7)
Select an option to see the answer and solution.
Which built-in function is used to convert a value to a floating-point number?
Select an option to see the answer and solution.
What will be the output of the following Python function?
import math
abs(math.sqrt(25))
Select an option to see the answer and solution.
What is the output of the following code:
my_string = "Hello, World!"
print(my_string.split())
Select an option to see the answer and solution.
What will be the output of the following Python function?
sum(2,4,6)
sum([1,2,3])
Select an option to see the answer and solution.
Which built-in function is used to capitalize the first letter of a string?
Select an option to see the answer and solution.
Which of the following functions will not result in an error when no arguments are passed to it?
Select an option to see the answer and solution.
The function pow(x,y,z) is evaluated as:
Select an option to see the answer and solution.
What is the purpose of the built-in function abs()?
Select an option to see the answer and solution.
What does the built-in function sorted() do in Python?
Select an option to see the answer and solution.
What will be the output of the following code:
my_string = "Hello, World!"
print(my_string.replace("Hello", "Hi"))
Select an option to see the answer and solution.
Which of the following functions accepts only integers as arguments?
Select an option to see the answer and solution.
What will be the output of the following Python function?
divmod(10.5,5)
divmod(2.4,1.2)
Select an option to see the answer and solution.
What will be the output of the following code:
my_list = [1, 2, 3, 4]
print(len(my_list))
Select an option to see the answer and solution.
The function complex('2-3j') is valid but the function complex('2 - 3j') is invalid.
Select an option to see the answer and solution.
Suppose there is a list such that: l=[2,3,4]. If we want to print this list in reverse order, which of the following methods should be used?
Select an option to see the answer and solution.