Open main menu

CDOT Wiki β

Changes

OPS435 Python Lab 5

4 bytes removed, 09:25, 5 September 2017
Create a Python Script Demonstrating Writing to Files
= INVESTIGATION 2: Exceptions and Error Handling =
 :Running into errors in programming will be a common occurrence. In python when a error occurs, python raises a python object called an exception, which represents the error that occured. These exceptions are raised when python is no long able to handle what the code is trying to do. This section will give the programmer the ability to catch these exceptions when they happen and allow the program to continue running, however in many cases it might be a good idea to stop the program when an exception happens anyway.
== PART 1 - Handling Errors ==
 :There are a massive amount of exceptions, way too many to cover. But if you are searching for a specific exception check out the [https://docs.python.org/3/library/exceptions.html#exception-hierarchy Python Exception Documentation.]
:'''Perform the Following Steps:'''
::#To start, open the ipython3 shell:<source lang="python">
13,420
edits