This repository contains a collection of instructional programming examples designed to support teaching foundational computer science concepts. Each example focuses on a specific concept and demonstrates both implementation and problem-solving strategies.
These examples are used to guide students through core topics such as iteration, modular arithmetic, and recursion, with an emphasis on clarity, readability, and structured thinking.
Introduces loops, conditionals, and the modulus operator through a classic programming problem. Emphasizes problem decomposition and refactoring.
Demonstrates how modular arithmetic applies to programming through a shift cipher implementation. Highlights character manipulation and handling edge cases such as negative values.
Introduces recursion by computing factorial values. Focuses on base cases, recursive calls, and understanding how functions build on themselves.
These examples are designed to:
- Encourage students to think through problems step-by-step
- Emphasize readability and structured design
- Connect mathematical concepts to programming implementations
- Promote experimentation and exploration
Rather than presenting only final solutions, these examples model the thought process behind solving problems.
Each folder contains:
- Source code for the example
- A README explaining the concept and teaching approach
These examples can be used in:
- Introductory programming courses
- Lecture demonstrations
- Guided lab exercises
This repository highlights an instructional approach to programming that prioritizes clarity, conceptual understanding, and structured problem-solving.