Week 03 - October 02¶
Class Description¶
This week we explore the deep connection between mathematical functions and computational functions, learning how proof techniques can validate our code and how testing serves as a form of mathematical verification. We'll design functions with formal specifications and create comprehensive test suites that demonstrate correctness.
Note: This is a short week with a 2-hour Thursday recitation session as our studio time.
Before Class¶
Flipped Classroom Reminder¶
Remember: Watch the videos before class so we can spend our time together on active learning and problem-solving!
Videos to Watch Before Class¶
Please watch the following videos before our class meeting:
CS 5001 - Week 2: Functions and Testing¶
- Lesson 2.1: What Makes a Function? [5:02]
- Lesson 2.2: Calling an Existing Function [10:28]
- Lesson 2.3: Writing Your Own Function [20:26]
- Lesson 2.4: Parameters and Scope [7:24]
- Lesson 2.5: Local vs. Global Scope [Text]
- Lesson 2.6: Return Statements [5:17]
- Lesson 2.7: Testing Your Functions [11:51]
- Lesson 2.8: Using doctest to test your functions (better way!) [13:32]
CS 5002 - Module 4: Set Cardinality and Methods of Proof¶
- Lesson 1: Inclusion-Exclusion Principle
- Lesson 2: Counting Cartesian Products
- Lesson 3: Proof by Contrapositive
- Lesson 4: Proof by Contradiction
- Lesson 5: Pigeonhole Principle
Class Materials¶
📋 Handouts¶
To be added
💻 Code Examples¶
Interactive Python examples to explore during and after class:
To be added
💡 Tip: Click on any example above to view the code directly in your browser, then copy and run it in your Python environment!