Aim Create a class called TabletCamera and a class called Facial_recognition that will be the base classes of a derived class called BioTablet. Steps for Completion Create a TabletCamera class that will be initialized with a pixels attribute. Create a Facial_recognition class with a scan_face method that prints the message, Scanning Face... Create a BioTablet class that inherits from both the TabletCamera and Facial_recognition classes. At the bottom of the script initialize an instance of the BioTablet class and pass it the value "12MP". Then we call the scan_face method and also print out the pixels attribute.
Scenario
It's the year 2017. You're working for an electronics company and have been tasked with modeling out the software for a cutting-edge tablet that will have a built-in face recognition front camera: a biometric tablet.
Aim
Create a class called TabletCamera and a class called Facial_recognition that will be the base classes of a derived class called BioTablet.
Steps for Completion
-
Create a TabletCamera class that will be initialized with a pixels attribute.
-
Create a Facial_recognition class with a scan_face method that prints the message, Scanning Face...
-
Create a BioTablet class that inherits from both the TabletCamera and Facial_recognition classes.
-
At the bottom of the script initialize an instance of the BioTablet class and pass it the value "12MP". Then we call the scan_face method and also print out the pixels attribute.
![Run the script with python3 main.py
command and we should have an
output that looks like Snippet 7.91:
Scanning Face...
12MP
Snippet 7.91](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F92524007-eb79-4716-97da-6681fe12a787%2F290cc957-78e2-49d6-9b73-85584218f90e%2Fuz7hmje_processed.png&w=3840&q=75)
![Lab Activity 7.7: Practicing Multiple Inheritance
| Practicing Multiple
duh.py
main.py
>_ Terminal
+
Inheritance
1 class TabletCamera:
workspace $ I
def -_init__(self,pixel):
self.pixel=pixel
def getPixel(se f):
return self .pixel
initialize an instance of the
4
BioTablet class and pass it the
5
</>
value "12MP". Then we call the
7 class Facial_recognition:
def scan_face(self):
print("Scanning Face....")
scan_face method and also
8.
print out the pixels attribute.
10
Run the script with python3 main.py
11
12 class BioTablet(TabletCamera,Facial_recognition):
command and we should have an
def --init__(self,pixel):
TabletCamera.-_init__(self,pixel)
13
output that looks like Snippet 7.91:
14
15
16
Scanning Face...
17 if -_name__ ==
18 # Write an instance of the BioTablet class
'-_main__':
12MP
19
20 # Call the scan_face method from the instance
Snippet 7.91
21
22 # Print the pixels from the instance
23
Grading
Complete each task listed below.
Each task contains automated checks
which are used to calculate your
grade. When you have completed
!!](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F92524007-eb79-4716-97da-6681fe12a787%2F290cc957-78e2-49d6-9b73-85584218f90e%2Fdnog7x_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)