Week 9 Questions (Exception) Lab Report
Document Details
Uploaded by Deleted User
Tags
Summary
This document contains questions related to exception handling in programming. It covers various types of exceptions and how to handle them using different techniques including try-except blocks. The document focuses on generating specific errors like zero division error, value error, and handling multiple exceptions within a single block.
Full Transcript
**Week 9 Questions (*Exception*)** 1. What type of error will be raised when the imported module is not found? Show one Example source code. 2. Generate zero division error, value error and global exception to handle all other errors. 3. Write a program make use of Try, Except, else, a...
**Week 9 Questions (*Exception*)** 1. What type of error will be raised when the imported module is not found? Show one Example source code. 2. Generate zero division error, value error and global exception to handle all other errors. 3. Write a program make use of Try, Except, else, and finally. 4. Use one block of except statements to handle multiple exception. 5. Use raise to create a customized error message using function. 6. Create list and show demonstration of index Error. 7. Use function and file handling and generate, FilenotFound, Permission Error (use path), EOF error. 8. Think of one logical program where user needs to guess the specific word from a list of strings. (ex: could be a car list, ice cream list, chocolates list) and catch any error that may arise during the execution of the program.