← IGCSE Computer Science Paper 1

Machine learning compared with a fixed program

A program that changes its own processes or data using feedback, so its results improve over time. A fixed program never changes: it follows the same instructions every time.

Understanding Machine learning compared with a fixed program in IGCSE Computer Science Paper 1

What it does: The rule is written by the programmer and never changes, so a temperature of 35 always turns the fan on. The program updates its own data when it gets feedback, such as a user marking an email as spam, so it gets better at spotting spam. A fixed program follows the same instructions every time. Only the programmer can change them. A fixed program never changes how it works, so using it more does not make it improve by itself. It uses feedback from users to change its own data and rules, so its results improve over time. Without feedback, the program cannot tell whether a result was good, so it cannot adapt.

Common mistakes: A learning spam filter uses feedback to improve its own data. When the user marks an email as spam, it should ADD the word to spam_list, not remove it. This fixed program should output Hot when temp is greater than the limit. The < operator makes it say Hot for cold temperatures. It should be IF temp > limit THEN.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 662–678) and word search (Modules 652–678).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
A program always gives the same output for the same input and only changes when a programmer edits it. What type of program is this?
A machine learning programA fixed program
Matches
A fixed program learns from feedback and rewrites its own rules
↓
A fixed program cannot change itself. Only a programmer can edit its instructions. Learning from feedback is what machine learning does.
Applying
Meanings
Term
machine learning
Meaning
A program that changes its own processes or data using feedback, so its results improve over time. A fixed program never changes: it follows the same instructions every time.
Practice
// Fixed program: never changes
Testing
Gaps
threshold 30
Check Answer
Spots
3 IF user marked it spam THEN
4 REMOVE word FROM spam_list

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Octopus' badge — Multi-Tasker, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. A program always gives the same output for the same input and only changes when a programmer edits it. What type of program is this?
A. A fixed program ✓
B. A machine learning program
A fixed program follows the same instructions every time. Only the programmer can change them.
2. Who changes the processes or data in a machine learning program as it improves?
A. The program itself ✓
B. Only the programmer, by editing the code
Machine learning adapts its own processes or data. A fixed program needs a programmer to make changes.
3. Which statement about results is correct?
A. A fixed program's results improve the more it is used
B. A machine learning program's results can improve over time ✓
A fixed program never changes how it works, so using it more does not make it improve by itself.
4. A calculator app always gives 12 when you enter 5 + 7. Which type of program is it?
A. A fixed program ✓
B. A machine learning program
It follows the same instructions every time, so the same input always gives the same output.
5. A spam filter gets more accurate as users mark emails as spam or not spam. Which type of program is it?
A. A fixed program
B. A machine learning program ✓
It uses feedback from users to change its own data and rules, so its results improve over time.

Match the Pairs

fixed program → Follows the same instructions every time, so the same input always gives the same output until a programmer edits it
machine learning → Changes its own processes or data using feedback, so its results can improve over time
A fixed program gives the same output for the same input every time it runs → if temp > 30 then fan ← ON (never changes)
Machine learning uses feedback to change its own data, so its answers improve → spam_score ← spam_score + feedback
A fixed program learns from feedback and rewrites its own rules → A fixed program cannot change itself. Only a programmer can edit its instructions. Learning from feedback is what machine learning does.
Machine learning needs no feedback because it improves by itself → Machine learning needs feedback, such as whether a result was right or wrong, to know how to change its processes or data so it improves.

Key Term

machine learning
A program that changes its own processes or data using feedback, so its results improve over time. A fixed program never changes: it follows the same instructions every time.

Fill in the Blanks

1. threshold ← 30 IF temp > threshold THEN OUTPUT "Hot"
Hint: Type the pseudocode assignment symbol that sets the fixed value the programmer wrote.
2. INPUT feedback IF feedback = "wrong" THEN threshold ← threshold - 1
Hint: Type the variable that the learning program updates by itself when feedback says it was wrong.
3. guess ← predict(photo) error ← actual - guess weight ← weight + error * 0.1
Hint: Type the variable that measures how wrong the guess was, which is the feedback used to improve.
4. FUNCTION double(n) RETURN n * 2 ENDFUNCTION
Hint: Type the keyword that sends a value back, so a fixed program gives the same output for the same input.
5. WHILE accuracy < 90 adjust(weights, error) ENDWHILE
Hint: Type the keyword that keeps repeating the self-improvement while the condition is still true.

Spot the Error

Question 1
A spam_list <- ["win", "free"]
B FOR EACH email IN inbox
C IF user marked it spam THEN
D REMOVE word FROM spam_list
E ENDIF
Line D — A learning spam filter uses feedback to improve its own data. When the user marks an email as spam, it should ADD the word to spam_list, not remove it.
Question 2
A limit <- 30
B INPUT temp
C IF temp < limit THEN
D OUTPUT "Hot"
E ENDIF
Line C — This fixed program should output Hot when temp is greater than the limit. The < operator makes it say Hot for cold temperatures. It should be IF temp > limit THEN.
Question 3
A guess <- model(photo)
B feedback <- guess
C IF guess <> feedback THEN
D UPDATE model
Line B — Learning needs feedback from outside, such as the label a user gives. Copying the program's own guess means the two can never differ, so the model never updates. It should be feedback <- user_label.
Question 4
A price <- 10
B INPUT qty
C total <- price + qty
D OUTPUT total
Line C — A fixed program follows the same instructions every time, so those instructions must be correct. The total should be price multiplied by qty, so it should be total <- price * qty.
Question 5
A WHILE
B guess <- model(data)
C feedback <- check(guess)
D model <- adjust(feedback)
E UNTIL accuracy >= 90
Line A — The loop ends with UNTIL, so it must start with REPEAT. A learning program repeats guess, feedback and adjust until its accuracy is good enough.

Student with a class code? Join your class →