> Terminal X + workspace $ python3 main.py The new upad has a 12.9 inch display. A max imum 1TB of storage and runs on the latest version of uPadOS 13.5.1. Its biggest compe titor is the Root Pro X which holds a simil ar 13.0 inch display, with a maximum storag e capacity of 512GB and runs Glass 10 Home. workspace $
Suppose you are a backend developer for a tech news platform. You have been asked to design a templating system for their news articles. To do this, you will need to run some proof of concepts.
- Define the TabletComputer class in the main.py file so that the code in Snippet 7.19 runs without error:
# Write your TabletComputer class here
uPad = TabletComputer(12.9, "1TB", "uPadOS 13.5.1")
rootProX = TabletComputer(13.0, "512GB", "Glass 10 Home")
print(f"The new uPad has a {uPad.screen_size}"
f" inch display. A maximum {uPad.storage} of storage and runs on"
f" the latest version of {uPad.os}. Its biggest competitor is"
f" the Root Pro X which holds a similar {rootProX.screen_size}"
f" inch display, with a maximum storage capacity of {rootProX.storage} and runs {rootProX.os}."
)
- Define the __init__ function within the TabletComputer class with the necessary parameters to set up the member variables.
You will need to set the following member variables:
- screen_size
- storage
- os
- After defining the class, running the preceding code should yield the output
![> Terminal
X
+
workspace $ python3 main.py
The new upad has a 12.9 inch display. A max
imum 1TB of storage and runs on the latest
version of uPadOS 13.5.1. Its biggest compe
titor is the Root Pro X which holds a simil
ar 13.0 inch display, with a maximum storag
e capacity of 512GB and runs Glass 10 Home.
workspace $](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F926476f8-cf6d-4249-9ce3-bde228dfc85a%2F417c55cb-a78f-4f04-a276-1dab86805675%2Fbynpwou_processed.png&w=3840&q=75)
Unlock instant AI solutions
Tap the button
to generate a solution
![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)