In this assignment, you need to add exception handling to thegiven code.
The file provided consists of a basic template, you need toinclude try- except statements at the correct positions, so thatyour program will not terminate returning an error.
The objective of this program is to read two integers from theinput and perform a division operation on them, and lastly writethe result to a file.
Your task is to handle incorrect inputs (like strings)(ValueError), dividing by zero (ZeroDivisionError) and givingincorrect filename (IOError) as the input.
You need to do the following:
- Include try at the appropriate position.
- Add except statements, one for each of these exceptions(ValueError,
OROR