Question: Python Lab: Note: please paste the code in the comment section to copy it easily. In-lab assignment # 11 Topics: Handling exceptions, list List manipulation
Python Lab:




Note: please paste the code in the comment section to copy it easily.
In-lab assignment # 11 Topics: Handling exceptions, list List manipulation reloaded!!! Due: In lab n this assignment, you are given one to perform different types of operation on the list elements. All the functions are provided, you need to find out the kind of exceptions that can happen while performing different operations on the elements and your task is to fill out the code with python exception handling mechanism wherever appropriate. Lab Scenario: 1. In this lab a list is provided that you need to obtain from a input file. The elements of the list are separated with comma. The code is provided to get the list from the file. The format of the ile is as follows: ,2,3, "NA",0,10 2. The following functions are provided. You need to fill out the exception handing blocks in the appropriate places. summation)-takes a list and return the summation of the list reciprocal0)-get the list element and return the reciprocal of the number. For example: reciprocal of 2 is 1/2-0.5 getList)-obtains the content of the file in a list. For this lab, you are expected to use python exception handling mechanism try-except block as we learned in the class lecture. The helper functions are provided, you need to fill out the functions with try- except statements wherever needed. In-lab assignment # 11 Topics: Handling exceptions, list List manipulation reloaded!!! Due: In lab n this assignment, you are given one to perform different types of operation on the list elements. All the functions are provided, you need to find out the kind of exceptions that can happen while performing different operations on the elements and your task is to fill out the code with python exception handling mechanism wherever appropriate. Lab Scenario: 1. In this lab a list is provided that you need to obtain from a input file. The elements of the list are separated with comma. The code is provided to get the list from the file. The format of the ile is as follows: ,2,3, "NA",0,10 2. The following functions are provided. You need to fill out the exception handing blocks in the appropriate places. summation)-takes a list and return the summation of the list reciprocal0)-get the list element and return the reciprocal of the number. For example: reciprocal of 2 is 1/2-0.5 getList)-obtains the content of the file in a list. For this lab, you are expected to use python exception handling mechanism try-except block as we learned in the class lecture. The helper functions are provided, you need to fill out the functions with try- except statements wherever needed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
