Question: i need an answer for this with python code and explenation for the rest i want the answer for 2.3 Lab 3: Object Oriented Programing

i need an answer for this with python code and explenation for the rest i need an answer for this with python code and explenation for
i want the answer for 2.3 the rest i want the answer for 2.3 Lab 3: Object Oriented
Programing in Python Exercise 2.3 Add a new variable to child class

Lab 3: Object Oriented Programing in Python Exercise 2.3 Add a new variable to child class and initialize its value. Print the result. Hint: to keep the inheritance of the parent's _init_() function, add a call to the parent's __init_O function. A module is a file containing a set of functions you want to include in your application. To create a module just save the code you want in a file with the file extension.py. To do that: Let before saving our module to modify what we did during this lab. Add a new greeting(name) function. Separate the class body from the invoking process. Then, go to main menu of your Jupyter editor and click on File Save as. Then, save this code in a file named mymodule.py The file will be saved in the active directory you set before. By default the file can be found by http://ocalhost:8888/tree To use module, we just created, use import statement as follows: Import mymodule Lab 3: Object Oriented Programing in Python 2.2. Inheritance To create a new class that is similar to one that already exists, it is often better to inherit the methods and attributes from an existing class rather than create a new class from scratch. This creates a class hierarchy, a class that inherits from another class is called a subclass, and the class that a subclass inherits from is called a superclass. To define a subclass, add the name of the superclass as an argument at the end of the class declaration um) wit.fin.fr Tel. Professor, Exercise 2.4 In the code above, the class Professor contains a pass keyword. What did this mean? Exercise 2.5 Replace the pass keyword in the child class with __init_0 function. Note that the child's _init_0 function overrides the inheritance of the parent's _inito function. {s} Lab 3: Object Oriented Programing in Python Exercise 2.3 Add a new variable to child class and initialize its value. Print the result. Hint: to keep the inheritance of the parent's_init_0 function, add a call to the parent's_init_ function. A module is a file containing a set of functions you want to include in your application. To create a module just save the code you want in a file with the file extension py. To do that: Let before saving our module to modify what we did during this lab. Add a new greeting(name) function. Separate the class body from the invoking process. Then, go to main menu of your Jupyter editor and click on File Save as. Then, save this code in a file named mymodule.py pyter my The file will be saved in the active directory you set before. By default the file can be found by http://localhost:8888/tree To use module, we just created, use import statement as follows: Import mymodule

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!