Question: PYTHON DEBUGGING HELP: PLEASE FIX THIS PROBLEM 5: Let's define a subclass of Book called PaperBook. PaperBook should inherit from Book and should add an
PYTHON DEBUGGING HELP: PLEASE FIX THIS

PROBLEM 5: Let's define a subclass of Book called PaperBook. PaperBook should inherit from Book and should add an instance variable called numTornPages, which is set to 0 in the constructor Add a method to the PaperBook class (NOT to the Book class) called ripPage , which increases numTornPages by 1 every time it is called In [43]: # define subclass here class PaperBook Book): def init_(self,title, author): self.numTornPages 0 super)._init(self) def ripPage (self): for x in self.numTornPages: self.numTornPages 1 In [44]: # manual test of subclass here last_lecture PaperBook ( 'The Last Lecture', 'Randy Pausch') print(last_lecture) Traceback (most recent call last) RecursionError
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
