Question: 1 . Write a Python program which accepts a list named : randomList = [ ' a ' , 0 , 2 ] . Use

1. Write a Python program which accepts a list named : randomList =['a',0,2]. Use exception handling using try-catch which gives the output as:
Output
1) If the List element is a alphabet or string, the output will be The entry is a Oops! occurred. Next entry.
2) If the List element is 0,the output will be The entry is 0 Oops! occured. Next entry.
3) If the List element is and integer except 0,then output will be The entry is 2 The reciprocal of 2 is 0.5// reciprocal of an integer

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 Programming Questions!