← IGCSE Computer Science Paper 1

IDE function: auto-completion

An IDE feature that suggests or finishes a keyword, function or variable name as you start typing it. It saves time and cuts spelling mistakes in names.

Understanding IDE function: auto-completion in IGCSE Computer Science Paper 1

What it does: Choosing the name from the suggestion list means it is spelled exactly as it was declared, so it avoids errors like plyerScore. Auto-completion finishes a partly typed name, but auto-correction changes a mistake that has already been typed. Auto-completion works while you type by showing suggestions. Running code line by line is how an interpreter works. It is an editing aid for the programmer, not something that changes the program's speed.

Common mistakes: The variable name score is misspelled as scroe, so Python cannot find it. Auto-completion would suggest score after typing sc, which avoids this mistake. The line should be total = score + 5. The variable was created as colour, but color was typed here, so the name does not exist. Picking colour from the auto-completion suggestion list would use the exact name. The line should be print(colour, size).

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 450–463) and word search (Modules 440–463).

Take this worksheet further — free with Cloodit

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

Learning
Duo
A programmer types 'pri' and the IDE shows a list including 'print'. Which IDE feature is this?
PrettyprintAuto-completion
Matches
Auto-completion automatically fixes pritn to print after you type it
↓
This describes auto-correction, not auto-completion. Auto-completion suggests or finishes a name while you are still typing it.
Applying
Meanings
Term
auto-completion
Meaning
An IDE feature that suggests or finishes a keyword, function or variable name as you start typing it. It saves time and cuts spelling mistakes in names.
Practice
DECLARE studentScore : INTEGER
Testing
Gaps
print()
Check Answer
Spots
1score = 10
2total = scroe + 5

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

The 'Ermine' badge — Tundra Streak, 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 programmer types 'pri' and the IDE shows a list including 'print'. Which IDE feature is this?
A. Auto-completion ✓
B. Prettyprint
Auto-completion suggests ways to finish a keyword, function or variable name as you start typing it. Prettyprint only changes the layout of code.
2. Which statement about auto-completion is correct?
A. It offers a suggestion list while the programmer is typing ✓
B. It runs the program one line at a time to find errors
Auto-completion works while you type by showing suggestions. Running code line by line is how an interpreter works.
3. Why is auto-completion useful to a programmer?
A. It translates the whole program into machine code
B. It saves typing time because the name is finished for them ✓
Finishing names for you saves time. Translating code is done by a translator such as a compiler, not by auto-completion.
4. A variable is called totalScore. How does auto-completion help avoid mistakes?
A. It changes totalScore to a shorter name automatically
B. It suggests totalScore so it is not misspelt as totalScroe ✓
Choosing the suggested name means fewer spelling mistakes in names. It never renames variables for you.
5. Which describes the difference between auto-completion and auto-correction?
A. Auto-completion suggests the rest of a name; auto-correction fixes a mistake that has already been typed ✓
B. Auto-completion fixes typing mistakes; auto-correction finishes names
The two are often mixed up. Completion helps finish what you are typing, while correction fixes errors that are already there.

Match the Pairs

pri → The programmer has typed only the first letters, so the IDE shows a suggestion list that includes print.
totalScore → A long variable name that auto-completion lets you finish by typing just a few letters and pressing Tab or Enter.
Auto-completion reduces spelling mistakes in names because the programmer picks the name from the list instead of typing it all. → playerScore chosen from list, not typed as plyerScore
Auto-completion is different from auto-correction: it offers to finish what you are typing, while auto-correction fixes errors that were already typed. → Auto-completion: ran -> range Auto-correction: pritn -> print
Auto-completion automatically fixes pritn to print after you type it → This describes auto-correction, not auto-completion. Auto-completion suggests or finishes a name while you are still typing it.
Auto-completion makes the program run faster when it is executed → Auto-completion only saves the programmer typing time and reduces spelling mistakes. It has no effect on how fast the program runs.

Key Term

auto-completion
An IDE feature that suggests or finishes a keyword, function or variable name as you start typing it. It saves time and cuts spelling mistakes in names.

Fill in the Blanks

1. playerScore = 10 print(playerScore)
Hint: Type the variable name that the IDE would finish for you after you typed only its first few letters.
2. print("Hello")
Hint: Type the function name that an IDE would suggest and complete after you typed only its first letters.
3. # The IDE shows a suggestion list
Hint: Type the word for the pop-up of possible matches that appears while you are typing.
4. # Finishes a name as you type: # auto-completion
Hint: Type the IDE feature that finishes names as you type, not the one that fixes mistakes afterwards.
5. word = "cloud" print(len(word))
Hint: Type the built-in function name that counts the characters; auto-completion saves you typing it in full and avoids misspelling it.

Spot the Error

Question 1
A score = 10
B total = scroe + 5
C print(total)
Line B — The variable name score is misspelled as scroe, so Python cannot find it. Auto-completion would suggest score after typing sc, which avoids this mistake. The line should be total = score + 5.
Question 2
A colour = 'red'
B size = 4
C print(color, size)
Line C — The variable was created as colour, but color was typed here, so the name does not exist. Picking colour from the auto-completion suggestion list would use the exact name. The line should be print(colour, size).
Question 3
A items = [1, 2, 3]
B count = len(items)
C print(cuont)
Line C — The variable count is misspelled as cuont, which causes a name error. Auto-completion suggests existing names as you type, so it cuts spelling mistakes like this. The line should be print(count).
Question 4
A totl = 0
B for n in range(3):
C total = total + n
D print(total)
Line A — The variable is created as totl, but total is used later, so the program fails. Auto-completion helps you type the same name each time. The line should be total = 0.
Question 5
A def greet(nmae):
B print('Hi ' + name)
C greet('Sam')
Line A — The parameter name is misspelled as nmae, but the body uses name. A suggestion list while typing would help keep the spelling the same. The line should be def greet(name):.

Student with a class code? Join your class →