← IGCSE Computer Science Paper 1

IDE function: auto-correction

An IDE feature that fixes, or suggests fixes for, simple mistakes like a misspelt keyword or a missing bracket. The programmer can accept the fix, so fewer syntax errors occur.

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

What it does: The misspelt keyword whiel is a simple typing mistake. Auto-correction replaces it with the correct keyword while. Auto-correction repairs a wrong word (fro to for). Auto-completion predicts the rest of a partly typed word (fo to for). Many IDEs suggest the fix, and the programmer chooses whether to accept it. It reduces syntax errors but does not remove all errors, so programmers must still test and debug their code.

Common mistakes: print is misspelt as prnt. This is a simple typing mistake that auto-correction would spot and suggest fixing to print('Hi ' + name), and the programmer can accept the fix. The closing bracket is missing. Auto-correction can add the missing ) and so prevent a syntax error. The line should be print(total).

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
Which IDE feature fixes a misspelt keyword such as 'pritn' and changes it to 'print'?
Auto-completionAuto-correction
Matches
Claiming: auto-correction suggests the code that finishes the word you are typing
↓
This describes auto-completion, not auto-correction. Auto-correction fixes mistakes that have already been made.
Applying
Meanings
Term
auto-correction
Meaning
An IDE feature that fixes, or suggests fixes for, simple mistakes like a misspelt keyword or a missing bracket. The programmer can accept the fix, so fewer syntax errors occur.
Practice
IF score >= 50 THEN
Testing
Gaps
("Score: 10")
Check Answer
Spots
2age = int(input('Age: '))
3prnt('Hi ' + name)

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

The 'Woodland Hedgehog' badge — Import Master, 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 IDE feature fixes a misspelt keyword such as 'pritn' and changes it to 'print'?
A. Auto-completion
B. Auto-correction ✓
Auto-correction fixes or suggests fixes for simple mistakes. Auto-completion only offers to finish what you are typing.
2. A student forgets a closing bracket and the IDE suggests adding ')'. What is this?
A. Auto-correction suggesting a fix ✓
B. A run-time error reported by the interpreter
The IDE spots a simple mistake and suggests a fix for the programmer to accept. This is auto-correction.
3. Auto-correction helps to reduce which type of error?
A. Syntax errors ✓
B. Logic errors in the algorithm
Auto-correction fixes simple typing mistakes such as misspelt keywords and missing brackets, so fewer syntax errors occur. It cannot understand what the program is meant to do.
4. What is the difference between auto-correction and auto-completion?
A. Auto-correction finishes code you have started typing; auto-completion fixes mistakes
B. Auto-correction fixes mistakes; auto-completion finishes code you have started typing ✓
Auto-completion predicts the rest of a word or statement. Auto-correction repairs a simple mistake that has already been typed.
5. True or false: with auto-correction, the programmer can accept the suggested fix.
A. True ✓
B. False
Many IDEs suggest the fix, and the programmer chooses whether to accept it.

Match the Pairs

pritn("Hi") changed to print("Hi") → Auto-correction fixes a misspelt keyword or function name without the programmer retyping it
print("Hi" with a suggested fix: add ) → Auto-correction suggests a fix for a missing bracket, and the programmer can accept it
Auto-correction fixes simple typing mistakes, such as a misspelt keyword → whiel x < 5: -> while x < 5:
Auto-correction is different from auto-completion: it repairs a mistake, while auto-completion finishes code being typed → Auto-correction: fro -> for | Auto-completion: fo -> for
Claiming: auto-correction suggests the code that finishes the word you are typing → This describes auto-completion, not auto-correction. Auto-correction fixes mistakes that have already been made.
Claiming: auto-correction guarantees the program has no errors → Auto-correction only fixes simple mistakes, such as spelling or a missing bracket. It cannot fix logic errors or bad algorithms.

Key Term

auto-correction
An IDE feature that fixes, or suggests fixes for, simple mistakes like a misspelt keyword or a missing bracket. The programmer can accept the fix, so fewer syntax errors occur.

Fill in the Blanks

1. # IDE fixes pritn to the correct word print("Score: 10")
Hint: Type the built-in function name that the IDE would correct the misspelt word to.
2. # IDE fixes the missing closing bracket score = int(input("Age: "))
Hint: Type the function name that converts the typed text into a whole number.
3. # IDE suggests changing fi to the keyword if score > 5: print("Pass")
Hint: Type the selection keyword that the IDE would suggest in place of the misspelt one.
4. total = 5 # IDE suggests fixing totl to the variable print(total)
Hint: Type the variable name defined on the first line that the IDE would correct the typo to.
5. # IDE offers a fix for rnage for i in range(3): print(i)
Hint: Type the function name used to make a loop count that the IDE would offer in place of the misspelling.

Spot the Error

Question 1
A name = input('Name: ')
B age = int(input('Age: '))
C prnt('Hi ' + name)
Line C — print is misspelt as prnt. This is a simple typing mistake that auto-correction would spot and suggest fixing to print('Hi ' + name), and the programmer can accept the fix.
Question 2
A total = 0
B for i in range(5):
C total = total + i
D print(total
Line D — The closing bracket is missing. Auto-correction can add the missing ) and so prevent a syntax error. The line should be print(total).
Question 3
A score = 72
B iff score >= 50:
C print('Pass')
Line B — The keyword if is misspelt as iff. Auto-correction would suggest changing it to if, which stops a syntax error.
Question 4
A count = 3
B while count > 0:
C pritn(count)
D count = count - 1
Line C — The letters in print are swapped. Auto-correction fixes or suggests fixes for typing mistakes like this. The line should be print(count).
Question 5
A items = ['pen', 'ruler']
B for item in items
C print(item)
Line B — The colon at the end of the for line is missing. This is a simple mistake that auto-correction can fix or suggest fixing, giving for item in items:.

Student with a class code? Join your class →