Question: Create a class named 'Parent', and inside the class, create a function named 'fun1' and pass the following message in the print()- This is
Create a class named 'Parent', and inside the class, create a function named 'fun1' and pass the following message in the print()- This is the message from the fun1'. a. Now create a class named 'Child1' and inside the class, create a method named 'fun2' and pass the following message in the print()- 'This is the message from the fun2'. b. After that, create another class named 'Child2' and inside the class, create a method named 'fun3' and pass the following message in the print() 'This is the message from the fun3'. c. Now, create an object of Child2 class and with the help of the object, call the 'fun1' method from the 'Parent' class. Create a class named 'Parent', and inside the class, create a function named 'fun1' and pass the following message in the print()- 'This is the message from the fun1'. a. Now create a class named 'Child' and inside the class, create a method named 'fun2' and pass the following message in the print()- This is the message from the fun2'. b. After that, create another class named 'Hybrid' and inside the class, create a method named 'fun3' and pass the following message in the print()- 'This is the message from the fun3'. c. Now create an object of Hybrid class and with the help of the object, call the 'fun1', 'fun2' and 'fun3' methods.
Step by Step Solution
3.31 Rating (157 Votes )
There are 3 Steps involved in it
There is the code or 1st question class Parent def fun1self printThis is the message from the fun1 c... View full answer
Get step-by-step solutions from verified subject matter experts
