Total Ten Questions Each Carry Two Marks
Total Time 20Min.
Quiz Summary
0 of 10 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 10 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
-
If you score more than 16 marks. You are good.
Otherwise, watch the oop concepts once and take the quiz again after a week.
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- Current
- Review
- Answered
- Correct
- Incorrect
-
Question 1 of 10
1. Question
Q1) What is the output displayed by the below program? Choose the correct option.
class C1: def M1(self): return self.M2() def M2(self): return 'A' class C2(C1): def M2(self): return 'B' a = C1() b = C2() print(a.M1(), b.M1(),a.M2(), b.M2())
CorrectIncorrect -
Question 2 of 10
2. Question
Q2) What is the output displayed by the below Program?
class a: def M1(self): ob1=b(10) return ob1 def M2(self,var2): var2=var2+self.M1().K() return var2 class b: def __init__(self,var1): self.var1=var1 def K(self): var1=11 var2=12 var3=var1+var2+self.var1 return var3 ob2=a() print(ob2.M2(20))
CorrectIncorrect -
-
Question 3 of 10
3. Question
Q3) What is the output displayed by the below program? if a=1, b=0, and index = 7 are given as inputs.Choose the correct option
a=int(input("enter a number")) b=int(input("enter a number")) index=int(input("enter index value")) lis=[1,2,3] try: c=a/b print(lis[index]) except Exception as e: print("hi") except ZeroDivisionError as z: print(z)
CorrectIncorrect -
Question 4 of 10
4. Question
Q4) What is the output displayed by the below program? Choose the correct option.
class a: var1=40 def __init__(self,var2): self.var2=var2 def M1(self): var1=20 var2=40 return self.var1+var2 ob1=a(30) print(ob1.M1())
CorrectIncorrect -
Question 5 of 10
5. Question
Q5) What is the output displayed by the below program?
class a: def __init__(self,var1): var1=var1+2 def M1(self,var2): return self.var1+var2 def M1(self,var2): return var2+var2 ob1=a(20) print(ob1.M1(40))
CorrectIncorrect -
-
Question 6 of 10
6. Question
Q6) What is the output displayed by the below program? Choose correct option
class a: def f(self): print("A") class b: def f1(self): print("B") class c: def f1(self): print("C") class d(a,c,b): def f1(self): print("D") super().f1() ob1=d() ob1.f1()
CorrectIncorrect -
Question 7 of 10
7. Question
Q7) What is the output displayed by the below program? choose correct option
class a: __var1=10 def __init__(self,var1): self.var1=var1 self.__var1=var1+2 def getvar1(self): return self.__var1 def setvar1(self,var1): self.__var1=var1 def M1(self): return self.var1+self.__var1+a.__var1 ob1=a(20) ob1.var1=ob1.var1+ob1.getvar1() ob1.setvar1(ob1.var1) print(ob1.var1+ob1.__var1())
CorrectIncorrect -
Question 8 of 10
8. Question
Q8) What is the output displayed by the below program? Choose correct option
def d(func): def inner1(x,y,z): if y>z: func(x,y,z) else: print("y less than z") return inner1 def d1(func): def inner(x,y,z): if x>y: func(x,y,z) else: print("x less than y") return inner @d @d1 def f(x,y,z): l=x+y+z print(l) f(5,7,6)
CorrectIncorrect -
Question 9 of 10
9. Question
Q9) The below program shows an error. State True or False.
class a: def M1(self): print("hello") def M2(self): self.M1() print("hi") @staticmethod def M3(): print("bye") def M4(): print("bubye") ob1=a() ob1.M2() ob1.M3() ob1.M4()
CorrectIncorrect -
-
Question 10 of 10
10. Question
Q10) The below program shows an error. State True or False.
from abc import * class a: def M1(self,var1): print("this is class a",var1) @abstractmethod def M2(self,var2): pass class b: def M3(self): print("this is class b") @abstractmethod def M2(self,var2): pass class c(a,b): def M3(self,var1): print("this is class c",var1) ob1=c() ob1.M3(10)
CorrectIncorrect -