Unit 6: B2 Programming
Topic 6.3: Control structures and modularity Questions
Practice 20 exam-style questions for IB Computer Science Topic 6.3. Review the question stems below, then unlock the full Question Bank to access markschemes, model answers, and AI grading.
1Determine2 marks
2026
Determine the output of: SET a TO 3; SET a TO 10; SET b TO a + 2; OUTPUT b.
Markscheme and model answer locked
Unlock Question2Choose1 mark
2026
Choose the value of n after: SET n TO 5; SET n TO n × 2; SET n TO n − 3.
Markscheme and model answer locked
Unlock Question3Explain3 marks
2026
Explain why stopping a search as soon as a match is found is worthwhile.
Markscheme and model answer locked
Unlock Question4Explain3 marks
2026
Explain why work that does not depend on the loop variable should be moved outside the loop.
Markscheme and model answer locked
Unlock Question5Construct4 marks
2026
Write a Java method that takes an array and returns the mean of its values.
Markscheme and model answer locked
Unlock Question6Determine2 marks
2026
Determine which of these is true for a mark of 105: (mark >= 0 AND mark <= 100) and (mark < 0 OR mark > 100).
Markscheme and model answer locked
Unlock Question7Determine2 marks
2026
Determine the output of the same code if the parameter is passed by reference.
Markscheme and model answer locked
Unlock Question8Explain3 marks
2026
Explain the difference between a chain of ELSE IF branches and a series of separate IF statements.
Markscheme and model answer locked
Unlock Question9Explain4 marks
2026
Explain two advantages of a modular program for a team.
Markscheme and model answer locked
Unlock Question10Determine2 marks
2026
Determine how many times the body runs in: FOR i FROM 0 TO 20 STEP 5.
Markscheme and model answer locked
Unlock Question11Define1 mark
2026
Define the term sequence in programming.
Markscheme and model answer locked
Unlock Question12Define1 mark
2026
Define the term function in programming.
Markscheme and model answer locked
Unlock Question13Determine3 marks
2026
Determine what a mark of 90 would produce under: IF mark >= 40 THEN OUTPUT 'C' ELSE IF mark >= 60 THEN OUTPUT 'B' ELSE IF mark >= 80 THEN OUTPUT 'A'.
Markscheme and model answer locked
Unlock Question14State1 mark
2026
State the three basic control structures of structured programming.
Markscheme and model answer locked
Unlock Question15Explain3 marks
2026
Explain why a variable must be assigned before it is used.
Markscheme and model answer locked
Unlock Question17Determine2 marks
2026
Determine the output of: SET x TO 2; SET y TO 3; SET t TO x; SET x TO y; SET y TO t; OUTPUT x, y.
Markscheme and model answer locked
Unlock Question18Construct4 marks
2026
Write a Python program that outputs a grade for a variable called mark: 'A' for 80 or more, 'B' for 60 to 79, 'C' for 40 to 59, and 'fail' below 40.
Markscheme and model answer locked
Unlock Question19Outline2 marks
2026
Outline what is meant by a function's signature.
Markscheme and model answer locked
Unlock Question20Explain3 marks
2026
Explain why a nested loop over a large array can be very slow.
Markscheme and model answer locked
Unlock QuestionReady to practice Topic 6.3?
Get instant AI feedback on your answers, view detailed markschemes, and track your progress across all IB Computer Science topics.
Start Practising Now