hands-on lab

Python: Exceptions

Difficulty: Intermediate
Duration: Up to 2 hours
Students: 115
Rating: 5/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Learn how to create, handle, and raise exceptions in Python.

Exceptions disrupt normal code flow in order to report exceptional conditions. Knowing how to handle exceptions is an essential aspect of software development. This lab introduces exceptions through hands-on learning.

Learning Objectives:

  • Raising exceptions
  • Handling exceptions
  • Creating new exception types
  • Re-raising exceptions

Prerequisites:

  • Proficient with:
    • The Python runtime
    • The Python language syntax
    • Python:
      • Classes
      • Callables

Covered topics

Lab steps

Web IDE Review
Introduction to Exceptions
Working with Exceptions
Re-raising and Raising From
Summary