Skip to content

Files

Latest commit

e6a2384 · Dec 1, 2021

History

History

class-03

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 1, 2021
Dec 1, 2021
Nov 21, 2021

FileIO / Exceptions

Python makes File Input and Output pleasantly easy.

Today we'll be creating a Madlib game that reads in a template file and writes a file back out with user input injected.

Will also handle exceptions as well as test that they are properly raised.

Learning Objectives

Students will be able to

Describe and Define

  • How python performs file input/output
  • Different modes for opening a file
  • Different kinds of file content, binary or text
  • Python exceptions

Execute

  • Reading a text file
  • Writing a text file
  • Reading a binary file
  • Writing a binary file
  • Handling exceptions
  • Raising exceptions
  • Testing exceptions

Today's Outline

Instructor to add. See facilitator guide for details.