[Solved]Task 3 Courseerror Courseerror Class Extends Notion Exception Note Exception Part Class Si Q37295878
PYTHON PROGRAMMING
Task 3 – CourseError The CourseError class extends the notion of an Exception (note the (Exception) part of the class signature line). We’re making our own exception that stores a single string message. class CourseError (Exception): Define the CourseError class to be a child of Exception class (by putting Exception in the parentheses as shown). def _init_(self,msg): Constructor.Store msg to an instance variable named msg. def-str-(self): human-centric representation of CourseError is just self.msg . If you skipped the two exception-raising parts above, you should now go back and add those checks/raises. The test cases for CourseError will go back and check if those parts correctly did so. Show transcribed image text Task 3 – CourseError The CourseError class extends the notion of an Exception (note the (Exception) part of the class signature line). We’re making our own exception that stores a single string message. class CourseError (Exception): Define the CourseError class to be a child of Exception class (by putting Exception in the parentheses as shown). def _init_(self,msg): Constructor.Store msg to an instance variable named msg. def-str-(self): human-centric representation of CourseError is just self.msg . If you skipped the two exception-raising parts above, you should now go back and add those checks/raises. The test cases for CourseError will go back and check if those parts correctly did so.
Expert Answer
Answer to Task 3 – CourseError The CourseError class extends the notion of an Exception (note the (Exception) part of the class si… . . .
OR

