Python MCQ Questions Set-4

python-mcq

Here is an interesting Python MCQ Quiz. Attempting this MCQ will help you to evaluate your knowledge and skills. Q1: What will be the output of the following Python code? class A(): def disp(self): print(“A disp()”) class B(A): pass obj = B() obj.disp() a) Invalid syntax for inheritance b) Error because when an object is … Read more

Python MCQ Questions Set-2

python-mcq

Python MCQ Questions:- Q1. What is the output of the following code? print(type(type())) a)Error b)Null c)None d)None of the above Answer a Q2.What is the output of following code? print(type(type)) a) <class ‘type’> b)Error c) <class ‘none’> d)None of the above Answer a Q3. What is the output of following code? class cc: def f1(self,a,b): … Read more