R

Ram Sharma • 193.86K Points
Coach

Q. Study the following program:

Code:
1. class book:
2. def __init__(a, b):
3. a.o1 = b
4. class child(book):
5. def __init__(a, b):
6. a.o2 = b
7. obj = page(32)
8. print “%d %d” % (obj.o1, obj.o2)
  • (A) 32
  • (B) 32 32
  • (C) 32 None
  • (D) Error is generated
  • Correct Answer - Option(D)
  • Views: 118
  • Filed under category Python

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics