Programming & Product Design
Learn to design algorithms, write Python code, and apply the MYP Design Cycle. Understand how CAD, CAM, systems thinking, and sustainable design principles connect to create effective solutions.
What You'll Learn
- Design algorithms using pseudocode and flowcharts
- Write Python programs using variables, data types, conditionals, loops, and functions
- Debug and test programs systematically
- Apply all four stages of the MYP Design Cycle
- Understand the role of CAD and CAM in modern design
- Apply systems thinking to understand how design components interact
- Incorporate sustainable design principles into your work
- Write a design brief and evaluate against specifications
IB Assessment Focus
Criterion A — Inquiring & Analysing: Research and justify the need; analyse existing products; develop a design brief.
Criterion B — Developing Ideas: Develop a specification; generate and evaluate multiple ideas; justify the best solution.
Criterion C — Creating the Solution: Create the solution; document and justify any changes to the plan.
Criterion D — Evaluating: Evaluate the product against the specification; test with users; identify improvements.
Key Vocabulary
| Term | Definition |
|---|---|
| Algorithm | A step-by-step set of instructions to solve a problem |
| Pseudocode | An informal, human-readable description of an algorithm's logic (not real code) |
| Flowchart | A visual diagram showing the steps and decisions in an algorithm |
| Variable | A named storage location in a program that holds a value |
| Loop | A programming structure that repeats code (for loop, while loop) |
| Conditional | Code that executes different actions based on a condition (if/else) |
| Function | A reusable block of code that performs a specific task |
| Debugging | The process of finding and fixing errors (bugs) in a program |
Algorithm Design
An algorithm is the plan for your program — you design the logic before writing code. Two key tools for representing algorithms are pseudocode and flowcharts.
Pseudocode
Pseudocode is an informal, structured way to describe an algorithm using plain language. It is not a programming language, but it follows a logical structure that can be easily translated into code.
INPUT length INPUT width SET area = length * width OUTPUT "The area is " + area
INPUT score
IF score >= 50 THEN
OUTPUT "Pass"
ELSE
OUTPUT "Fail"
END IF
Flowcharts
Flowcharts use standard symbols to visually represent the steps and decisions in an algorithm:
| Symbol | Shape | Meaning |
|---|---|---|
| Oval | Rounded rectangle | Start / End (terminator) |
| Rectangle | Box | Process (calculation, assignment) |
| Diamond | Diamond shape | Decision (yes/no question) |
| Parallelogram | Slanted rectangle | Input / Output |
| Arrow | Line with arrowhead | Flow direction |
Python Programming Basics
Python is a beginner-friendly programming language used in MYP Design. Learn the core building blocks: variables, data types, conditionals, loops, and functions.
Variables & Data Types
A variable stores a value that can be used and changed throughout a program. Python has several data types:
| Data Type | Description | Example |
|---|---|---|
| String (str) | Text, enclosed in quotes | "Hello", 'IB Student' |
| Integer (int) | Whole number | 42, -7, 0 |
| Float | Decimal number | 3.14, -0.5 |
| Boolean (bool) | True or False | True, False |
# Creating variables
name = "Lukas" # String
age = 14 # Integer
height = 1.72 # Float
is_student = True # Boolean
# Getting user input
user_name = input("Enter your name: ")
user_age = int(input("Enter your age: ")) # Convert input to integer
Conditional Statements (if/else)
Conditionals let your program make decisions based on conditions. Python uses if, elif (else if), and else.
# Simple if/else
if age >= 18:
print("You are an adult")
else:
print("You are a minor")
# Multiple conditions with elif
score = 85
if score >= 90:
print("Grade: A")
elif score >= 80:
print("Grade: B")
elif score >= 70:
print("Grade: C")
else:
print("Grade: below C")
Loops
Loops repeat a block of code. Python has two types:
# Print numbers 0 to 4
for i in range(5):
print(i) # Output: 0, 1, 2, 3, 4
# Print each item in a list
fruits = ["apple", "banana", "cherry"]
for fruit in fruits:
print(fruit)
# Count down from 5
count = 5
while count > 0:
print(count)
count = count - 1 # Don't forget to change the variable!
print("Go!")
Functions
A function is a reusable block of code that performs a specific task. Functions help organise your program, reduce repetition, and make code easier to read and debug.
# Defining a function
def greet(name):
print("Hello, " + name + "!")
# Calling the function
greet("Lukas") # Output: Hello, Lukas!
greet("Teacher") # Output: Hello, Teacher!
# Function with a return value
def calculate_area(length, width):
area = length * width
return area
result = calculate_area(5, 3)
print(result) # Output: 15
: after if, for, while, or def statements. (2) Incorrect indentation — Python uses indentation to define code blocks. (3) Infinite while loops — always update the loop variable. (4) Using = (assignment) instead of == (comparison) in conditions.The MYP Design Cycle
The Design Cycle is a structured process for developing solutions. In MYP Design, every project follows these four stages, which directly align with the four assessment criteria.
The Four Stages
| Stage | Criterion | What You Do | Key Outputs |
|---|---|---|---|
| 1. Inquire & Analyse | Criterion A | Identify the problem; research the context; analyse existing products; write a design brief | Research notes, product analysis, design brief |
| 2. Develop Ideas | Criterion B | Write a design specification; generate multiple ideas; evaluate and justify the chosen design | Specification, sketches/prototypes, justified selection |
| 3. Create the Solution | Criterion C | Build/code the final product; document changes and justify them; follow the plan | Finished product, development log with justifications |
| 4. Evaluate | Criterion D | Test the product against the specification; gather user feedback; identify improvements | Test results, evaluation report, improvement suggestions |
Writing a Design Brief
A design brief is a short, clear statement that outlines the problem you are solving and for whom. It should include:
- The problem or need: What issue have you identified?
- The client or target audience: Who will use the solution?
- The context: Where and when will it be used?
- Constraints: Budget, time, materials, or other limitations
- The proposed solution type: What kind of product will you create?
Example: "I will design a Python quiz program for Grade 7 students to help them revise key vocabulary for their Science exam. The program must be easy to use, provide immediate feedback, and track the user's score."
Design Specification
The specification is a list of measurable criteria your product must meet. Each point should be testable so you can evaluate your product against it in Stage 4.
- Must include at least 10 questions
- Must display the correct answer when the user gets it wrong
- Must track and display a final score
- Must be easy for a Grade 7 student to navigate without help
- Must run without errors (no crashes)
- Must use appropriate vocabulary for the target audience
CAD, CAM & Sustainable Design
Modern design uses digital tools and must consider environmental impact. Understand how technology and sustainability principles shape the design process.
CAD — Computer-Aided Design
What it is: Software used to create precise 2D drawings and 3D models of products digitally before they are manufactured.
Advantages:
- Designs can be easily modified, shared, and stored
- Allows precise measurements and dimensions
- 3D models can be rotated and viewed from any angle
- Reduces material waste (test designs before building)
- Can be directly linked to CAM for manufacturing
Examples: Tinkercad, SketchUp, Fusion 360, AutoCAD
CAM — Computer-Aided Manufacturing
What it is: Using computer-controlled machines to manufacture products from CAD designs.
Advantages:
- High precision and consistency — every product is identical
- Faster production than manual manufacturing
- Reduces human error
- Can produce complex shapes that are difficult to make by hand
Examples: 3D printers, laser cutters, CNC routers, vinyl cutters
Systems Thinking
Systems thinking means understanding how all parts of a system interact and affect each other. In design, changing one component has knock-on effects on others.
Example: Changing a product's material from plastic to bamboo affects:
- Cost: Bamboo may be more or less expensive
- Manufacturing: Different tools and processes are needed
- Weight: The product may be lighter or heavier
- Durability: Bamboo has different structural properties
- Environmental impact: Bamboo is renewable and biodegradable
- Aesthetics: The product will look and feel different
Sustainable Design Principles
Sustainable design considers the environmental impact of a product throughout its entire lifecycle — from material sourcing to manufacturing, use, and disposal.
| Principle | What It Means | Example |
|---|---|---|
| Reduce | Use fewer materials; minimise waste | Lightweight packaging, efficient use of material sheets |
| Reuse | Design products that can be used again | Refillable containers, modular components |
| Recycle | Use materials that can be recycled at end of life | Aluminium, glass, certain plastics |
| Renewable materials | Use materials that can be regrown or replenished | Bamboo, wood from managed forests, cotton |
| Energy efficiency | Minimise energy used in manufacturing and product use | LED lighting, efficient motors |
| Durability | Design products to last, reducing the need for replacement | Quality construction, timeless design |
Debugging, Testing & Evaluation
Testing and evaluation ensure your solution works correctly and meets the design specification. Debugging is a critical skill for any programmer.
Debugging
Debugging is the process of finding and fixing errors (bugs) in your code. There are three main types of errors:
| Error Type | What It Is | Example |
|---|---|---|
| Syntax error | Breaking the rules of the programming language; the program won't run | Missing colon: if age > 18 instead of if age > 18: |
| Runtime error | The program runs but crashes during execution | Dividing by zero, accessing a list index that doesn't exist |
| Logic error | The program runs without crashing but produces the wrong output | Using + instead of * in an area calculation |
Debugging Strategies
- Read the error message: Python tells you the line number and type of error
- Use print statements: Print variable values at key points to check they are correct
- Test with different inputs: Try normal, boundary, and invalid inputs
- Trace through the code: Follow the logic step by step on paper
- Comment out sections: Isolate the problem by temporarily removing code
Testing Your Solution
Systematic testing ensures your program handles all types of input correctly:
| Test Type | Purpose | Example (for a quiz accepting scores 0–100) |
|---|---|---|
| Normal data | Test with typical, expected inputs | Score = 75 |
| Boundary data | Test at the limits of acceptable input | Score = 0, Score = 100, Score = 50 (pass/fail boundary) |
| Invalid data | Test with inputs that should be rejected | Score = -5, Score = 150, Score = "abc" |
Evaluating Against the Specification
In Criterion D, you must evaluate your final product against each point in your design specification:
- Test each specification point and record the results (pass/fail with evidence)
- Gather user feedback from your target audience
- Identify strengths — what works well and meets the specification
- Identify areas for improvement — what could be better and how
- Suggest specific improvements — be detailed and actionable, not vague
Practice Questions
Tap each question to reveal the model answer. Try to answer from memory first before checking.
for i in range(100): print(i) prints numbers 0–99 in two lines rather than 100 separate print statements.if age > 18 without a colon should be if age > 18:.A logic error occurs when the program runs without crashing but produces the wrong output. The code is valid Python, but the logic is flawed. Example: writing
area = length + width instead of area = length * width — the program runs, but the answer is incorrect.Logic errors are harder to find because there is no error message — you must test your program with known inputs to detect them.
Stage 2 — Develop Ideas (Criterion B): Write a detailed specification listing requirements. Generate multiple design ideas, evaluate each against the specification, and justify your chosen solution.
Stage 3 — Create the Solution (Criterion C): Build or code your product following your plan. Document any changes made during creation and justify why they were necessary.
Stage 4 — Evaluate (Criterion D): Test the product against each specification point. Gather user feedback. Identify strengths, weaknesses, and suggest specific improvements.
They should record: (1) What changed — the material was changed from plastic to bamboo; (2) Why it changed — perhaps bamboo is more sustainable, lighter, or the plastic was unavailable; (3) How it affected the outcome — the product is now more environmentally friendly but may require different joining techniques.
Undocumented changes demonstrate poor process management and result in lost marks, even if the final product is good.
CAM (Computer-Aided Manufacturing) uses computers to control manufacturing machines (3D printers, laser cutters, CNC routers) that produce physical products.
They work together: a designer creates a product in CAD, then sends the digital file directly to a CAM machine for manufacturing. This ensures the physical product exactly matches the digital design, reduces human error, enables mass production of identical items, and saves time compared to manual manufacturing.
OUTPUT "Enter temperature in Celsius:" INPUT celsius SET fahrenheit = (celsius * 9/5) + 32 OUTPUT celsius + "°C is " + fahrenheit + "°F"This pseudocode follows the correct structure: take input, process it using the formula, and output the result. In Python, this would be:
celsius = float(input("Enter temperature in Celsius: "))fahrenheit = (celsius * 9/5) + 32print(f"{celsius}°C is {fahrenheit}°F")Flashcard Review
Tap each card to reveal the answer. Try to answer from memory first.