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

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

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!