
The IB Computer Science syllabus has changed, and students taking their first examinations in May 2027 face a different Paper 2 from previous cohorts.
Programming is now central to the assessment. Students can answer using Python or Java, but they must demonstrate computational thinking, algorithm design and debugging skills rather than simply memorising code.
This creates an important question: Should you prepare in Python or Java, and what exactly will the examination expect you to do?
A September 2026 r/IBO discussion shared study notes and examination-style resources for the 2027 and 2028 cohorts, reflecting interest in materials aligned with revised IB syllabuses.
The most useful Computer Science preparation is not collecting large amounts of code. It is learning to trace, construct, debug and explain algorithms confidently in your chosen language.
This guide covers the official Paper 2 format, differences between Python and Java, original worked problems and practical revision strategies.
What Changed in IB Computer Science for 2027?
According to the official IB Computer Science curriculum update, the revised course began teaching in August 2025, with first assessment in May 2027.
The course is organised into two themes.
Theme A: Concepts of computer science covers computer fundamentals, networks, databases and machine learning.
Theme B: Computational thinking and problem-solving focuses on algorithms, programming and the application of computational techniques.
Paper 1 assesses Theme A, including a pre-seen case study.
Paper 2 assesses Theme B.
The previous option papers have been removed, and the former HL Paper 3 no longer exists.
Importantly, programming is now an assessed requirement for both SL and HL students.
Older resources focused on pseudocode and optional syllabus topics may therefore be unsuitable as the main preparation material.
IB Computer Science Paper 2: Official Exam Format
The IB Computer Science subject brief confirms the examination structure.
| Assessment detail | SL | HL |
|---|---|---|
| Duration | 1 hour 15 minutes | 2 hours |
| Maximum marks | 50 | 80 |
| Final grade weighting | 35% | 40% |
| Main content | Theme B, SL topics | Theme B, SL and HL topics |
| Programming language | Python or Java | Python or Java |
| Question format | Compulsory extended responses | Compulsory extended responses |
All questions within the selected language option are compulsory.
One question focuses on algorithmic thinking without requiring students to interpret or write program code.
The remaining questions assess programming and problem-solving skills.
HL students also encounter additional questions involving more advanced object-oriented programming and abstract data types.
Python or Java: Which Should You Choose?
The official assessment provides two language options.
Option A uses Java.
Option B uses Python.
According to the IB's Computer Science FAQ for first assessment in 2027, the corresponding questions assess equivalent skills and are designed to be of equal difficulty.
Students must answer the option for the language they have studied and must not mix questions from both options.
| Consideration | Python | Java |
|---|---|---|
| Syntax | Usually concise, indentation defines blocks | More explicit syntax with braces and declared types |
| Variables | Dynamically typed | Statically typed |
| Collections | Lists and other built-in structures | Arrays, ArrayLists and other collections |
| Object-oriented programming | Supported through classes and objects | Supported through classes and objects |
| Examination expectation | Demonstrate the required algorithms | Demonstrate the same underlying algorithms |
Python may feel more approachable to beginners because of its shorter syntax.
Java may appeal to students already comfortable with explicit data types and class structures.
However, the IB does not treat one language option as easier than the other.
The best choice is generally the language taught by your school and the one in which you can solve problems confidently.
Changing languages shortly before the examination can introduce unnecessary syntax and debugging difficulties.
Is Pseudocode Still Required?
This is one of the most important changes for the 2027 examination.
The official IB FAQ clarifies that pseudocode is not required in Paper 2.
Students are not expected to write pseudocode, and examination questions will not present algorithms in pseudocode.
Teachers may still use pseudocode as a learning tool.
It can help students plan a solution before translating it into Python or Java.
However, revision should not revolve around memorising the pseudocode conventions from the previous syllabus.
Students must become comfortable interpreting and constructing algorithms in their chosen programming language.
What Programming Content Should You Revise?
Theme B covers several connected areas.
| Syllabus area | Skills to practise |
|---|---|
| B1: Computational thinking | Decomposition, abstraction, pattern recognition, algorithm design and flowcharts |
| B2: Programming fundamentals | Variables, data types, strings, exception handling and debugging |
| B2: Data structures | Arrays, lists, stacks and queues |
| B2: Programming constructs | Selection, iteration, functions and variable scope |
| B2: Algorithms | Linear search, binary search, bubble sort, selection sort and efficiency |
| B2: File processing | Reading, writing and appending text files |
| B3: Object-oriented programming | Classes, objects, constructors, encapsulation and related concepts |
| B4: Abstract data types | Additional HL content including linked lists, binary search trees, sets and hash tables |
The 2027 Computer Science guide specifies the required depth for each topic.
Students should not assume that every algorithm or data structure found in a university programming course is examinable.
Prioritise the specific syllabus statements and command terms.
Worked Example 1: A Simple Algorithm in Python and Java
Consider this original examination-style task:
Write a function that receives a list of student scores and a threshold. Return the number of scores strictly greater than the threshold. Do not use a built-in counting function.
For example:
Scores: [48, 70, 70, 85, 42]
Threshold: 70
Expected result: 1
Only the score of 85 is strictly greater than 70.
Python solution
def count_above(scores, threshold):
count = 0
for score in scores:
if score > threshold:
count += 1
return count
Java solution
public static int countAbove(int[] scores, int threshold) {
int count = 0;
for (int score : scores) {
if (score > threshold) {
count++;
}
}
return count;
}
Both solutions use the same algorithm.
They initialise a counter, examine every element, increment the counter when the condition is satisfied and return the result.
The syntax differs, but the computational thinking is identical.
How to Trace the Algorithm
Tracing means following the execution of an algorithm and recording how variables change.
For the previous example:
| Score examined | Is score greater than 70? | Counter after iteration |
|---|---|---|
| 48 | No | 0 |
| 70 | No | 0 |
| 70 | No | 0 |
| 85 | Yes | 1 |
| 42 | No | 1 |
Final output: 1
Now consider a common error.
If the condition were written as score >= threshold, the result would be 3.
That is incorrect because the problem specifies strictly greater than.
This illustrates why students must read conditions carefully rather than assume that a familiar algorithm automatically matches the question.
Worked Example 2: Binary Search
Binary search is another important algorithm in the revised syllabus.
It searches an ordered collection by repeatedly eliminating approximately half the remaining search space.
Consider the sorted list:
[3, 7, 12, 18, 26, 40, 51]
The task is to find the index of 26, using zero-based indexing.
Python solution
def binary_search(values, target):
left = 0
right = len(values) - 1
while left <= right:
middle = (left + right) // 2
if values[middle] == target:
return middle
elif values[middle] < target:
left = middle + 1
else:
right = middle - 1
return -1
Java solution
public static int binarySearch(int[] values, int target) {
int left = 0;
int right = values.length - 1;
while (left <= right) {
int middle = left + (right - left) / 2;
if (values[middle] == target) {
return middle;
} else if (values[middle] < target) {
left = middle + 1;
} else {
right = middle - 1;
}
}
return -1;
}
Both functions return the matching index or -1 when no match exists.
Trace Binary Search Step by Step
For target 26:
| Step | Left | Right | Middle | Middle value | Action |
|---|---|---|---|---|---|
| 1 | 0 | 6 | 3 | 18 | Search right half |
| 2 | 4 | 6 | 5 | 40 | Search left half |
| 3 | 4 | 4 | 4 | 26 | Target found |
The result is index 4.
The key prerequisite is that the values are sorted.
Applying this algorithm to an unsorted list can produce incorrect results.
Binary search has logarithmic time complexity, commonly expressed as O(log n), because the remaining search space is repeatedly reduced.
A basic linear search has O(n) worst-case time complexity because it may inspect every element.
Paper 2 can test both the ability to construct these algorithms and the reasoning behind their efficiency.
The code examples in this article are original educational exercises, not official IB examination questions.
Learn Debugging as a Separate Examination Skill
The revised syllabus explicitly includes debugging techniques.
Students should be able to identify and correct errors using trace tables, printed output, breakpoints and step-by-step execution.
Consider this incorrect Python loop:
for i in range(len(scores) + 1):
print(scores[i])
If the list contains five elements, the valid indices are 0 through 4.
The loop attempts to access index 5, producing an IndexError.
The corrected version is:
for i in range(len(scores)):
print(scores[i])
The equivalent Java problem occurs when a loop allows the index to reach scores.length.
A correct array traversal normally uses a condition such as i < scores.length.
When debugging, distinguish between:
Syntax errors: The program violates the language's grammatical rules.
Runtime errors: Execution fails, such as accessing an invalid array index.
Logic errors: The program runs but produces an incorrect result.
A strong answer identifies the error, explains its effect and provides a suitable correction.
What About Object-Oriented Programming?
Object-oriented programming is included at both SL and HL, but the required depth differs.
SL students must understand concepts such as classes, objects, constructors, methods and encapsulation.
For example, a simple StudentRecord class could store a student's score and provide a method that checks whether the score meets a threshold.
The important concepts are the relationship between the class definition, object state and method behaviour.
HL students extend this understanding to multiple-class designs.
Additional topics include inheritance, polymorphism, abstraction, composition, aggregation and relevant design patterns.
The IB subject guide identifies the additional HL requirements under B3.2.
Do not skip OOP simply because you are studying at SL.
Equally, do not assume every advanced OOP concept is required at SL.
Understand Abstract Data Types at HL
HL students study additional abstract data types, including linked lists, binary search trees, sets and hashing-related structures.
A question may require selecting an appropriate structure, explaining how its operations work or applying it to a programming problem.
For example, a linked list can support insertion and deletion without shifting every subsequent array element, although locating a particular node may require traversal.
A binary search tree organises values using ordering relationships, but its efficiency depends on the tree's shape.
Students should understand the trade-offs rather than memorise a single claim that one data structure is always faster.
SL students still need conceptual understanding of stacks and queues.
These are included in the shared B2 data structures content.
Can You Use Python Built-In Functions?
Python includes useful functions and methods that simplify common programming tasks.
However, the IB Computer Science FAQ confirms that some Paper 2 questions will prohibit particular built-in functions.
Restrictions will be stated explicitly in the examination question.
For instance, a question assessing selection sort may require students to construct the sorting algorithm rather than call Python's built-in sorting functionality.
That does not mean built-in functions are universally prohibited.
The correct strategy is to read the question carefully and implement the required algorithm.
Students should also practise manual approaches so they understand the operations that convenient library functions perform.
Python and Java: Common Mistakes to Avoid
| Mistake | Why it matters | Better approach |
|---|---|---|
| Mixing Python and Java syntax | Produces incorrect code for the chosen option | Practise consistently in one language |
Confusing = and == | Changes assignment or comparison behaviour | Check conditional expressions |
| Ignoring index boundaries | Can cause out-of-range errors | Trace first and final iterations |
| Using binary search on unsorted data | Violates the algorithm's prerequisite | Check ordering before searching |
| Calling prohibited built-in functions | May fail to demonstrate the required algorithm | Follow restrictions in the question |
| Forgetting a termination condition | Can create an infinite loop | Verify how loop variables change |
| Memorising code without tracing it | Makes unfamiliar variations difficult | Predict outputs and explain each step |
The IB FAQ explains that minor syntax mistakes are considered in context, but errors that affect execution or demonstrate misunderstanding may lead to lost marks.
Accuracy matters, even though the assessment focuses on problem-solving rather than perfect typing.
A Seven-Day Paper 2 Revision Plan
| Day | Revision focus | Practical activity |
|---|---|---|
| 1 | Computational thinking | Practise decomposition and trace flowcharts |
| 2 | Programming fundamentals | Write functions with loops and conditions |
| 3 | Data structures | Manipulate arrays and lists; explain stacks and queues |
| 4 | Algorithms | Trace linear search, binary search and sorting |
| 5 | Debugging and file processing | Correct broken programs and practise text-file operations |
| 6 | Object-oriented programming | Construct and trace classes; add HL extensions where applicable |
| 7 | Timed examination practice | Complete relevant specimen questions and review errors |
For HL, include dedicated practice with additional OOP concepts, recursion and abstract data types.
Use the IB Programme Resource Centre through your school to obtain official specimen papers and markschemes.
The first live examinations for this syllabus take place in May 2027, so older past papers must be used selectively rather than treated as exact models of the new format.
Final Checklist for IB Computer Science Paper 2 2027
Before your examination, confirm that you can:
- Explain decomposition, abstraction and algorithmic thinking.
- Trace algorithms and flowcharts accurately.
- Construct working programs in your selected language.
- Manipulate arrays, lists and strings.
- Apply selection, iteration and modular functions.
- Implement and trace required searching and sorting algorithms.
- Identify syntax, runtime and logic errors.
- Explain appropriate algorithmic efficiency.
- Apply the OOP and data structure content required at your level.
- Follow restrictions on built-in functions and answer only your selected language option.
The best language for IB Computer Science Paper 2 2027 is the one you understand well enough to use for unfamiliar problems.
Python and Java provide different syntax, but the assessment tests the same underlying computational thinking.
Focus on designing algorithms, tracing their execution, explaining decisions and debugging mistakes.
When you can solve the same problem confidently without relying on a memorised program, you are preparing for what the revised Paper 2 is designed to assess.
For definitive details, consult the IB Computer Science curriculum updates, the official subject brief and your school's 2027 subject guide and specimen papers.
Table of contents
Share
Related reading
- IB Computer Science 2027: Paper 1 vs Paper 2 ExplainedUnderstand IB Computer Science Paper 1 vs Paper 2 for 2027, including SL and HL timings, marks, Theme A, Theme B, case studies and revision strategies.
- IB Computer Science Case Study 2027: AI Image CreationPrepare for the IB Computer Science case study 2027 with clear explanations of diffusion models, GANs, AI image ethics and practical Paper 1 exam advice.
- IB Computer Science IA 2027: Criteria, Format and ExamplesUnderstand the IB Computer Science IA 2027 rubric, 2,000-word report, video and code appendix. Explore a worked project example and practical evidence tips.
- Can IB Math AI HL Get You Into Computer Science in 2027?Can IB Math AI HL get you into Computer Science? Compare 2027 university entry rules at Oxford, UCL, Cambridge and more to choose your subjects confidently.
- IB Computer Science: What You Really Study and BuildIs IB Computer Science right for you? Explore the 2027 syllabus, SL and HL papers, coding expectations and IA requirements before choosing your DP subjects.
