Module 7: Importing Files and the Coding Style Guide

In this module you will learn how to import files from other directories and how to write code that is styled for optimal readability.

Module Learning Outcomes

By the end of the module, students are expected to:

  • Describe what Python libraries are, as well as explain when and why they are useful.

  • Identify where code can be improved concerning variable names, magic numbers, comments and whitespace.

  • Write code that is human readable and follows the black style guide.

  • Import files from other directories.

  • Use pytest to check a function’s tests.

  • When running pytest, explain how pytest finds the associated test functions.

  • Explain how the Python debugger can help rectify your code.

Accompanied Video