Create a beginner-friendly programming lab for a Programming Language course using the following learning pattern for every exercise:
Example → Understand the Code → Modify the Code → Solve a Similar Task
The lab must use the exact output format specified below for every exercise. Do not change, remove, or reorder the sections.
For every exercise, follow these four stages:
Every exercise MUST follow this exact structure:
[Programming concept being taught]
By completing this exercise, students will be able to:
Problem Statement: [Short and clear problem statement]
Input: [Describe the input]
Output: [Describe the required output]
Code:
// Complete working code
Expected Output:
[Exact sample output]
What does the program do? [Simple explanation]
Step-by-Step Explanation:
Important Concepts:
Key Syntax:
// Important syntax example
Students should modify the Example program, rather than writing a completely new program.
Task: [Specific modification]
Expected Change: [What students should achieve]
Task: [Specific modification]
Expected Change: [What students should achieve]
Task: [Specific modification]
Expected Change: [What students should achieve]
Do not provide the solutions to the modifications unless explicitly requested.
Problem Statement: [New problem using the same concept but with a different scenario]
Input: [Required input]
Output: [Required output]
Requirements:
Sample Input:
[Sample input]
Sample Output:
[Sample output]
Do not provide the solution code. Students must solve this task independently.
Before moving to the next exercise, students should be able to answer:
For EVERY exercise, enforce the following rules:
Every Solve a Similar Task section must contain:
After all exercises, provide:
Create 3–5 independent programming problems that combine the concepts covered in the lab.
For each task, use this format:
Problem Statement: …
Input: …
Output: …
Requirements:
Sample Input:
...
Sample Output:
...
Do not provide solutions.
Design the exercises so that students progressively move from:
Seeing a working example ↓ Understanding how it works ↓ Changing an existing program ↓ Writing a similar program independently
The goal is to make students understand and construct programs, rather than simply copy code.
Always maintain the same fixed structure for every exercise.