Please do not give solution in image format thanku Createa file named method_override.py and follow the instructions below: ● Take user inputs
Please do not give solution in image format thanku
Createa file named method_override.py and follow the instructions below:
● Take user inputs that ask for the name, age, hair colour, and eye colour of a
person.
● Create an adult class with the following attributes and method:
○ name, age, eye_colour, and hair_colour
○ Method called can_drive() that prints the name of the person and
that they are old enough to drive.
● Create a subclass of the adult class named “Child” that has the same
attributes, but overrides the can_drive method to print the persons name
and that they are too young to drive.
● Create some logic that determines if the person is 18 or older and create an
instance of the Adult class if this is true. Otherwise, create an instance of the
Child class. Once the object has been created, call the can_drive() method
to print out whether the person is old enough to drive or not.
Most importantly, please ensure to pass the parameters in the constructor correctly and to add comments for easy understanding in the code.
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)