Chapter 1: Exception Handling in Python

1 / 50

Best use of exception handling:

2 / 50

Exception handling avoids:

3 / 50

Custom message in raise is:

4 / 50

raise without argument re-raises:

5 / 50

If assert fails, it raises:

6 / 50

assert checks:

7 / 50

assert is used for:

8 / 50

Custom exceptions can be:

9 / 50

Syntax of raise:

10 / 50

raise keyword is used to:

11 / 50

try without except/finally:

12 / 50

except without try:

13 / 50

finally is optional:

14 / 50

Nested try blocks are:

15 / 50

Multiple except blocks are:

16 / 50

Order of blocks:

17 / 50

else block executes when:

18 / 50

finally block executes:

19 / 50

If exception occurs, control goes to:

20 / 50

Code inside try block is:

21 / 50

IOError is related to:

22 / 50

Which error for wrong module import?

23 / 50

ValueError occurs when:

24 / 50

Which error for undefined variable?

25 / 50

ArithmeticError includes:

26 / 50

Which is base class of exceptions?

27 / 50

TypeError occurs when:

28 / 50

End of file error occurs in:

29 / 50

File not found error:

30 / 50

Import failure raises:

31 / 50

Missing key in dictionary raises:

32 / 50

Accessing invalid list index raises:

33 / 50

Invalid value input raises:

34 / 50

Invalid type operation raises:

35 / 50

Division by zero raises:

36 / 50

Exception handling improves:

37 / 50

Which error occurs when variable not defined?

38 / 50

try block must be followed by:

39 / 50

Multiple except blocks are used to:

40 / 50

Which block runs if no exception occurs?

41 / 50

Which keyword is used for cleanup code?

42 / 50

Exception is a:

43 / 50

Errors that occur during execution are called:

44 / 50

Which of the following is NOT an error type?

45 / 50

Which keyword is used to catch exceptions?

46 / 50

Exceptions occur:

47 / 50

Which block is used to handle exceptions?

48 / 50

Which error stops program execution before running?

49 / 50

Syntax errors occur during:

50 / 50

What is an exception in Python?

Your score is

The average score is 0%