The output of print(type(100)) in QPythonly will be:
A <class 'Int'>
B <class 'String'>
C <class 'float'>
D <class 'bool'>
Answers
Answered by
5
Answer:
What will be the output of the following code : print type(type(int)
Given: print type ( type ( int ) )
To find: The output of the following code.
Solution:
So we have provided with a code as print type ( type ( int ) ) .
Now we know that type() method returns class type of the argument(object) passed as parameter.
So in this also, the type() function is returning the class of the argument the object belongs to.
Thus, type ( int ) returns the output as type ‘type’, which is of the type ‘type’ object.
In some compilers, it shows "invalid syntax" errors, so in that case the code should be written as:
print ( type ( type ( int ) ) )
Answer:
So the output is type ‘type’.
Explanation:
#Hope you have satisfied with this answer.
Similar questions