Programming and Algorithms: Week 3

banner

Data Persistence

What are we doing this week?


This week we are going to look at how Python does FILE MANAGEMENT, and also how it manages EXCEPTION HANDLING.
 
Python Python Logo

Powerpoint: File Management


Powerpoint: Exception Handling


Total running time of videos is 30 minutes.


Python: Reading and Writing Files

 
Python: Exception Handling



Links
Python for Beginners: Reading and Writing Files
http://www.pythonforbeginners.com/files/reading-and-writing-files-in-python

Learn Python the Hard Way: Reading and Writing Files
http://learnpythonthehardway.org/book/ex16.html

Python Docs: Files Input and Output
https://docs.python.org/2/tutorial/inputoutput.html

Online Interpreter:
Python Intrepreter
Sample Code:
File Reading (Example 1, Example 2, Example 3, Example 4, Example 5, Example 6, Example 7) * Binary File Reading * File Writing (Example 1, Example 2, Example 3, Example 4, Example 5) * Exception Handling (Example 1, Example 2, Example 3, Example 4, Example 5, Example 6, Example 7)

Sample Files:
MyData.txt * MyData2.txt * Python.gif

Lab #3
Lab #3 is all about checking if you can read and write to a file.


back

If you have any suggestions, corrections, or comments, please feel free to e-mail me at:
Damian.Gordon(a)dit.ie