PCEP Section 4C: Python Built-In Exceptions Hierarchy

Quiz
•
Computers
•
12th Grade
•
Medium
Misti McDaniel
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the top-most class in Python’s built-in exception hierarchy?
Exception
BaseException
SystemExit
RuntimeError
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the direct parent class of the `IndexError` exception in Python?
LookupError
ValueError
ArithmeticError
Exception
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which exception is raised when the `del` statement is used on a dictionary key that does not exist?
IndexError
KeyError
ValueError
TypeError
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following exceptions is NOT a subclass of `Exception`?
SystemExit
ValueError
TypeError
IndexError
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which exception is raised when an operation or function is applied to an object of inappropriate type?
ValueError
TypeError
KeyError
LookupError
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes an "abstract exception" in Python’s built-in exception hierarchy?
An exception that cannot be instantiated directly and is meant to be subclassed.
An exception that is only used for mathematical errors.
An exception that is raised for keyboard interrupts.
An exception that is used for system exit events.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose you have the following code: ```python try: print(1 / 0) except Exception as e: print("Caught:", type(e).__name__) ``` What will be printed?
Caught: ArithmeticError
Caught: ZeroDivisionError
Caught: ValueError
Caught: TypeError
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Translators and Computing Languages: GCSE 9-1

Quiz
•
9th Grade - University
10 questions
Error Finding

Quiz
•
12th Grade
20 questions
Unit 3 Python TEST

Quiz
•
11th - 12th Grade
10 questions
PF Unit 10

Quiz
•
9th Grade - University
10 questions
STRING MANIPULATION (PYTHON)

Quiz
•
11th - 12th Grade
10 questions
Coding Basics

Quiz
•
5th Grade - University
20 questions
GR 12_DATA FILE HANDLING_SS

Quiz
•
12th Grade
20 questions
Python Unit 3 Comprehension Check (3,4,5,6)

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade