← IGCSE Computer Science Paper 1

Expert system

An AI system that uses the knowledge and rules of human experts to give advice or answers on one specialist subject. It asks the user questions and gives a conclusion.

Understanding Expert system in IGCSE Computer Science Paper 1

What it does: The code sets one specialist subject, which is what an expert system covers instead of many unrelated topics. The output is the conclusion or advice the expert system gives once it has used the user's answers and its rules. It acts like a human expert, so people can get specialist advice without needing to speak to the expert. The knowledge and rules come from human experts in the subject, which is why the advice can be trusted.

Common mistakes: The expert system stores the user's answer in a variable and then tests it. The answer was stored in temp, but the IF rule tests fever. Line 2 should be INPUT fever. An IF rule needs THEN after its condition. Line 3 should be IF yellow = "yes" 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 652–661) 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
Which statement describes an expert system?
An AI system that can give expert advice on any subject without being given rulesAn AI system that uses the knowledge and rules of human experts to give advice on one subject
Matches
subject = "all subjects"
↓
An expert system works on one specialist subject only. It cannot be an expert in every subject at once.
Applying
Meanings
Term
expert system
Meaning
An AI system that uses the knowledge and rules of human experts to give advice or answers on one specialist subject. It asks the user questions and gives a conclusion.
Practice
OUTPUT "Does the engine start?"
Testing
Gaps
leaf
Check Answer
Spots
1OUTPUT "Do you have a fever?"
2INPUT temp

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

The 'Sperm Whale' badge — Deep Sea Champion, 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. Which statement describes an expert system?
A. An AI system that can give expert advice on any subject without being given rules
B. An AI system that uses the knowledge and rules of human experts to give advice on one subject ✓
An expert system stores the knowledge and rules of human experts, so it covers one specialist subject only.
2. An expert system is built to work in...
A. one specialist subject, such as medical diagnosis ✓
B. every subject at once, like a general knowledge quiz
Each expert system is designed around one specialist subject, such as medicine, car repair or mineral prospecting.
3. What is the job of an expert system?
A. To stand in for a human expert when one is not available ✓
B. To replace the user's need to answer any questions
It acts like a human expert, so people can get specialist advice without needing to speak to the expert.
4. How does an expert system find out about the user's problem?
A. It asks the user questions ✓
B. It reads the user's mind
The system asks the user a series of questions and uses the answers to work towards a conclusion.
5. What does an expert system give back to the user at the end?
A. A new set of rules it wrote for the user
B. A conclusion or advice ✓
After the questions, the expert system gives a conclusion, such as a likely diagnosis, or advice on what to do next.

Match the Pairs

expert system → An AI system that uses the knowledge and rules of human experts to give advice or answers on one specialist subject
ask_user("Do you have a fever?") → The expert system asks the user a question to collect the facts it needs
An expert system stands in for a human expert by giving advice on one specialist subject, such as medicine → subject = "medical diagnosis"
After the user answers its questions, an expert system gives a conclusion or advice → print("Advice: see a doctor")
subject = "all subjects" → An expert system works on one specialist subject only. It cannot be an expert in every subject at once.
expert = "user guesses the advice" → The expert system gives the advice or conclusion using expert knowledge and rules. The user does not guess it.

Key Term

expert system
An AI system that uses the knowledge and rules of human experts to give advice or answers on one specialist subject. It asks the user questions and gives a conclusion.

Fill in the Blanks

1. OUTPUT "Is the leaf yellow?" INPUT leaf
Hint: Type the keyword that lets the system take the user's answer to its question.
2. IF leaf = "yes" THEN OUTPUT "Add more water" ENDIF
Hint: Type the keyword that follows the condition in a rule and leads to the advice.
3. IF fever = "yes" THEN OUTPUT "See a doctor" ENDIF
Hint: Type the keyword that closes the IF rule.
4. IF temp > 38 THEN OUTPUT "Fever" ENDIF
Hint: Type the comparison operator that checks if the temperature is greater than 38.
5. IF rash = "yes" AND fever = "yes" THEN OUTPUT "Advice: see a doctor" ENDIF
Hint: Type the logical operator that needs both conditions to be true before the expert advice is given.

Spot the Error

Question 1
A OUTPUT "Do you have a fever?"
B INPUT temp
C IF fever = "yes" THEN
D OUTPUT "See a doctor"
E ENDIF
Line B — The expert system stores the user's answer in a variable and then tests it. The answer was stored in temp, but the IF rule tests fever. Line 2 should be INPUT fever.
Question 2
A OUTPUT "Is the leaf yellow?"
B INPUT yellow
C IF yellow = "yes"
D OUTPUT "Lacks iron"
E ENDIF
Line C — An IF rule needs THEN after its condition. Line 3 should be IF yellow = "yes" THEN.
Question 3
A subject ← "All subjects"
B OUTPUT "Does it start?"
C INPUT starts
Line A — An expert system covers one specialist subject, such as car repair. It cannot be an expert in all subjects. Line 1 should name one subject: subject ← "Car repair".
Question 4
A INPUT age
B IF age > 18 THEN
C OUTPUT "Ask a parent first"
D ELSE
E OUTPUT "You can sign"
F ENDIF
Line B — The rule gives the 'ask a parent' advice to users under 18. The comparison is the wrong way round, so adults would be told to ask a parent. It should be IF age < 18 THEN.
Question 5
A INPUT rain
B IF rain ← "yes" THEN
C OUTPUT "Take an umbrella"
D ENDIF
Line B — A rule compares the user's answer with a value, so it uses = and not the assignment arrow ←. Line 2 should be IF rain = "yes" THEN.

Student with a class code? Join your class →