Python: Classes and Modules


Overview/Description
Target Audience
Prerequisites
Expected Duration
Lesson Objectives
Course Number
Expertise Level



Overview/Description
Python is a lot more than a scripting language, and can be used to create OOP applications using classes, or using a functional paradigm. This course covers some of the ways Python programs can execute. You'll learn about building your own custom functions and classes, and documentation and file handling.

Target Audience
Beginner Python developers, and developers with experience in other languages looking to start programming in Python

Prerequisites
None

Expected Duration (hours)
2.9

Lesson Objectives

Python: Classes and Modules

  • start the course
  • create and import a module at the Python REPL
  • define a function in Python
  • describe the difference in operation between Python scripts, programs and modules
  • run a module as a script using the __name__ == __main__ syntax in Python
  • create a main function that takes command line arguments in Python
  • describe the relationship between classes and types in Python
  • create a class definition and describe the structure in Python
  • write a class initializer method in Python
  • write and use class instance methods in Python
  • write and use static methods in Python
  • use inheritance and describe the semantics in Python
  • describe class properties in Python
  • describe how inheritance affects properties in Python
  • write a class that implements operator overloading in Python
  • write docstrings in Python
  • write comments in Python
  • describe best practice for documenting Python code as set out in PEP 8
  • read text files in Python
  • write data in Python
  • write large files in Python
  • read binary data in Python
  • write binary data in Python
  • write a Python class to represent a vector
  • Course Number:
    pg_pyth_a02_it_enus

    Expertise Level
    Beginner