Module 2 Objective Mapping
Thomas J. Kennedy
1 Module Objectives
Module 2 starts our discussion of Python… more specifically setting up a Python development environment, running some code, and exploring the Zen of Python.
You will notice quite a few mappings of Module 2 objectives (row) to Course Objectives (column). We are introducing quite a few aspects of Python (whirlwind introduction).
As we move throughout the semester… each of these topics and concepts will be incrementally covered in more detail.
# | Module Objective | 1 | 2 | 3 | 4 | 5 | 6.A | 6.B | 7.A | 7.B | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Checkout the course example set GitHub Repository. | ✓ | ✓ | |||||||||||||||
2 | Create a project in their preferred IDE: VSCode or Vim (with appropriate plugins). | ✓ | ||||||||||||||||
3 | Run a provided Python program. | ✓ | ✓ | |||||||||||||||
4 | Run a set of provided tests for a Python program. | ✓ | ✓ | |||||||||||||||
5 | Describe the basic structure of a Python program. | ✓ | ✓ | |||||||||||||||
6 | Discuss PEP 8. | ✓ | ✓ | ✓ | ||||||||||||||
7 | Discuss PEP 20. | ✓ | ✓ | ✓ | ||||||||||||||
8 | Discuss how to approach an somewhat unfamiliar language (e.g., Python or Rust). | ✓ | ✓ | ✓ | ✓ | ✓ |
2 Lectures & Objectives
The following table shows lectures (rows) vs Module Level Objectives (columns).
Lecture | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | |
---|---|---|---|---|---|---|---|---|---|
Module 2 Objective Mapping | |||||||||
Why Learn Python? | ✓ | ||||||||
A First Look at PEP 20 (The Zen of Python) | ✓ | ||||||||
Structure of a Basic Python Program | ✓ | ||||||||
Structure of a Python Program with Tests | ✓ | ||||||||
Python Style & PEP 8 | ✓ | ||||||||
Procedural, Object-Oriented, and Functional | ✓ | ||||||||
Pythonic Code & “Good” Code | ✓ | ✓ | ✓ | ||||||
Module 2 Summary |
Note that Module Level Objectives 1 through 4 are covered in lab exercises.
3 Course Level Objectives
The course objectives are listed in section 2.4 of the syllabus and reproduced in this document for reference.
A student who successfully completes this course will be able to (in Python):
- Run a program consisting of a single file and containing a
main
function. - Run a program consisting of multiple modules and containing a
main
function. - Organize code into multiple modules.
- Write tests for a module.
- Apply the basics of test-driven development through PyTest and/or
unittest
. - Make use of the various loops (for and while)
- Compare the various loops (for and while)
- Choose the most appropriate loop (for or while) for a given problem
- Make use of the conditional blocks (i.e., if, if-else, and if-else-if-else).
- Compare the various conditional blocks (i.e., if, if-else, and if-else-if-else)
- Construct the appropriate conditional block (i.e., if, if-else, and if-else-if-else) for a given problem.
- Test and write functions.
- Design ADTs in accordance with the Class Checklist.
- Discuss when polymorphism is appropriate.
- Discuss when it is appropriate to utilize dataclasses, classes, and enums.
- Write code that utilizes dunder functions.
- Refactor code to follow best practices (e.g., PEP 8 and PEP 20).
- Apply code linting tools (e.g., pylint and black) to write idiomatic (Pythonic) code.
- Discuss the various NumPy
np.array
mechanics (e.g., broadcasting).