Question: Question 1: In a comment, name all the different errors that might occur when the following function is run (needless to say, you should consider

Question 1: In a comment, name all the different errors that might occur when the following function is run (needless to say, you should consider all the different inputs that might be provided when the function is called): def f(L): assert type(L) -- list out - L[0] **2 return 1/out Question 2: Can you rewrite the function in question 1 so that *all* errors are suppressed no matter what input the user provides? In the case of an error, the function should return 'error
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
