a) int b) bool c) float d) None Answer: a Explanation: Execute help(math.trunc) to get details.
View QuestionWhich of the following results in a SyntaxError?
a) ‘”Once upon a time…”, she said.’ b) “He said, ‘Yes!'” c) ‘3\’ d) ”’That’s okay”’
View QuestionIn order to store values in terms of key and value we use what core data type.
a) list b) tuple c) class d) dictionary Answer: d Explanation: ...
View Question
What data type is the object below?
L = [1, 23, ‘hello’, 1]
What data type is the object below? L = [1, 23, 'hello', 1] a) list b) dictionary c) array
View Question
In python we do not specify types, it is directly interpreted by the compiler, so consider the following operation to be performed.
>>>x = 13 ? 2
objective is to make sure x has a integer value, select all that apply (python 3.xx)
In python we do not specify types, it is directly interpreted by the compiler, so consider the following ...
View QuestionWhat is the return type of function id?
a) int b) float c) bool d) dict Answer: a Explanation: Execute help(id) to find ...
View QuestionWhich of the following will run without errors?
a) round(45.8) b) round(6352.898,2,5) c) round() d) round(7463.123,2,1) Answer: a Explanation: Execute help(round) in the shell to get details ...
View Question
What will be the output of the following Python code snippet?
def example(a):
a = a + ‘2’
a = a*2
return a
>>>example(“hello”)
What will be the output of the following Python code snippet? def example(a): a ...
View QuestionGiven a function that does not return any value, What value is thrown by default when executed in shell.
a) int b) bool c) void d) None Answer: d Explanation: Python shell throws a NoneType object back.
View QuestionWhich of these in not a core data type?
a) Lists b) Dictionary c) Tuples d) Class Answer: d Explanation: Class is a user defined ...
View Question