Question: In Python please For this assignment, you're submitting multiple files. Make sure you save them in the same directory. 1. Write: In a file named

In Python please
 In Python please For this assignment, you're submitting multiple files. Make

For this assignment, you're submitting multiple files. Make sure you save them in the same directory. 1. Write: In a file named Library.py, the following: a. A function orOther that takes two parameters, x and y. If x is not 0, orOther returns x, else return y. b. A function assertion that takes one parameter, thing. assertion should raise a TypeError if thing is None, otherwise, pass. 2. Write: In a file named dependent.py, the following: a. Begin by importing the library module written in part 1. A simple import Library at the top of your file will suffice b. Create a function op erationthat takes one parameter, value.operationshould use the function assertion from the libraryto raise an exception if the value is None. operation should then use the function orother from the library to return 5 if value is 0, otherwise, returning value. C. Create a function wr apper. wrapper takes a single parameter, value, which it passes to the function operation. If operation raises an exception, wrapper catches the ex- ception, and prints 'The operation was unsuccessful.' to the screen and returns None. Otherwise, wrapper returns the value returned by operation

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!