Try Exception Task

Programming Question

1.  Write a program catching exceptions in python.

2. Write a program to input a number, if it is not a number generate an error message.

3. Write a program with no exception, so the try clause will run

4. Write a program there is an exception so only except clause will run.

5. Write a program to create try and except code using all error handling with an example of every error

Theory Questions

1. What is a try. How to use it?

2. What is except. How to use it?

3. What is finally block. How to use it

4. What is else block. How to use it

5. What is Raise an exception. How to use it