Python MCQ Questions Set-7

python-mcq

Here is an interesting Python Multiple choice questions Quiz. Attempting this MCQ will help you to evaluate your knowledge and skills. Q1 What is the output of following code?def fun(name,age):print(name)print(age)fun(25,”tom”)a)25 tomb)25 ‘tom’c) tom 25d)tom ‘25’ Q2. What is the output of following code?def fun(name,age):print(“name is “,name)print(“age is “,age)fun(age=25,name=”jack”)a) name is jack age is 25b) name … Read more

Python MCQ Questions Set-6

python-mcq

Here is an interesting Python Quiz. Attempting these Multiple choice questions will help you to evaluate your knowledge and skills. Which of the following commands will create a list?a) list1 = list()b) list1 = []c)list1=[1,2,3,4]d) all of the mentioned What is the output when we execute list(“hello”)?a) [‘h’, ‘e’, ‘l’, ‘l’, ‘o’]b) [‘hello’]c) [‘llo’]d) [‘olleh’] … Read more

Python MCQ Questions Set-5

python-mcq

This article contains Python MCQ Quiz. Attempting this MCQ will help you to evaluate your knowledge and skills. Q1. What is the output of the following code?print(type(type()))a)Errorb)Nullc)Noned)None of the above Q2.What is the output of the following code?print(type(type))a)b)Errorc)d)None of the above Q3 What is the output of following code?class cc:def f1(self,a,b):self.a=aself.b=breturn self.a+self.bo=new cc()print(o.f1(4,4))a)8b)Errorc)4d)None of the … Read more

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