InterviewSolution
Saved Bookmarks
| 1. |
Rewrite the following code after removing errors. Underline each correction and write the output after correcting the code:class First():def _init_ (self):print “first”:class Second(object):def _init_ (self):print “second” class Third(First, Second):def _init_ (self):First. _init_ (self):Second. _init_ (self):print “that’s it”t=Third()t=Third() |
|
Answer» class First(): def _init_ (self): print “first” class Second(object): def_ init_(self): print “second” class Third(First, Second): def _init_ (self): First._init_ (self) Second._init_(self) print “that’s it” t=Third() t=Third() |
|