Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write Python Codes for the following: Get 2 inputs from the user and perform division using these numbers and handle ZeroDivisionError, ValueError, and NameError by
Write Python Codes for the following:
Get 2 inputs from the user and perform division using these numbers and handle ZeroDivisionError, ValueError, and NameError by printing related errors. (2 points) 2. Define a class with one method that sorts the elements in the list in descending order, and another method that sorts in ascending order. Print the sorted elements of the list [15, 21, 11, 14, 32, 67] by creating an object of your class and calling the respective methods (2 points) 3. Look at the python script given in the link below school info.py and list the number of classes and name of the functions (without the constructor) along with its arguments in each class as a comment in the .ipynb file (4 points) 4. Draw a diagram to show the hierarchy of the classes in the file school info.py, and submit the answer as a .docx or .pdf file (3 points) 5. Make a class with a constructor that takes a list as input and calculates the sum of all the values in the list. Instantiate this class by passing a list with 10 integers. Add a breakpoint inside the constructor such that the interactive console of PDB can be used to look at the values of the addition after each item in the list is calculated. No need to post if you used the PDB console or not (3 points).
Step by Step Solution
★★★★★
3.38 Rating (154 Votes )
There are 3 Steps involved in it
Step: 1
Here are Python code snippets to address each of your points Get 2 inputs from the user and perform ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started