Exception Handling in Python

4.7
18 個評分
提供方
Coursera Project Network
在此指導項目中,您將:

Demonstrate an understanding of exceptions versus errors.

Develop examples of specific exception handling techniques in Python.

Clock1 hour 15 minutes
Intermediate中級
Cloud無需下載
Video分屏視頻
Comment Dots英語(English)
Laptop僅限桌面

In this 1-hour long project-based course, you will learn the differences between an exception and syntax errors, how to raise an exception, what an AssertionError exception is within Python, how to use the try, except and else clause and how to use the finally clause and any clean-up actions. By the end of this project, you will have an understanding of error and exception handling in python. Once you have a beginner's knowledge of python programming and start coding you may find that something disrupts the normal flow of the program you have built. You may find yourself with errors in your code. This course will provide students with the knowledge behind exception handling in python and show how to write high-quality code to ensure that if your python scripts encounter a situation that it cannot cope with that the right procedures are in place to provide meaningful information and deal with those errors. Thus, ensuring that your code is efficient and robust which is an essential aspect of writing high-quality code. This project will take students through a number of examples demonstrating several of the most useful python exceptions. You will gain an understanding of exception handling in python from the in-depth examples provided.

您要培養的技能

Software DevelopmentPython ProgrammingException Handling

分步進行學習

在與您的工作區一起在分屏中播放的視頻中,您的授課教師將指導您完成每個步驟:

  1. Demonstrate an understanding of the differences between syntax errors and exceptions.

  2. Raise an exception through coded examples.

  3. Create a programme outlining an AssertionError exception.

  4. Create a programme using the try, except and else clause.

  5. Create a programme to utilise the finally clause and clean-up actions.

指導項目工作原理

您的工作空間就是瀏覽器中的雲桌面,無需下載

在分屏視頻中,您的授課教師會為您提供分步指導

常見問題

常見問題

還有其他問題嗎?請訪問 學生幫助中心