AS Level Computer Science chapter 9: Algorithm design and problem-solving MCQs with answers

By Team Megalecture · Updated 4 Nov 2026

22 exam-style questions on Algorithm design and problem-solving, each with the answer and a short explanation. Ten of them are below to try. The chapter test draws ten fresh questions each time and is marked the moment you finish, with your score by topic.

22 questions · 2 topics · 10 per test

Test this chapter freeAll AS Level Computer Science chapters

What chapter 9 covers

Ten Algorithm design and problem-solving questions with answers

Try each one, then open the answer. These ten stay the same; the test draws new ones every time.

1. A program models a bus route to plan timetables. Which detail should be left out of the abstract model?

  1. A
    the distance between each pair of stops
  2. B
    the average time for passengers to board
  3. C
    the number of buses that are available
  4. D
    the colour of the seats fitted in each bus
Show answer

Answer: D. Seat colour has no effect on journey times, so it is not an essential detail. Distances, boarding times and bus numbers all affect the timetable.

2. A flowchart inputs N, then a decision box asks "Is N > 0?". Yes leads to output "Positive"; No leads to output "Not positive"; both then go to Stop. Which pseudocode follows INPUT N?

  1. A
    IF N >= 0 THEN OUTPUT "Positive" ELSE OUTPUT "Not positive" ENDIF
  2. B
    IF N > 0 THEN OUTPUT "Positive" ELSE OUTPUT "Not positive" ENDIF
  3. C
    IF N > 0 THEN OUTPUT "Not positive" ELSE OUTPUT "Positive" ENDIF
  4. D
    WHILE N > 0 DO OUTPUT "Positive" ENDWHILE
Show answer

Answer: B. A single decision with two branches that rejoin is an IF ... THEN ... ELSE ... ENDIF. The condition must be exactly N > 0; N >= 0 would call 0 positive.

3. What is output by this algorithm?
Total ← 0
FOR Index ← 1 TO 5
   IF MOD(Index, 2) = 1 THEN
      Total ← Total + Index
   ENDIF
NEXT Index
OUTPUT Total

  1. A
    15
  2. B
    6
  3. C
    9
  4. D
    5
Show answer

Answer: C. MOD(Index, 2) = 1 is true for odd values only. Total: 0 + 1 = 1, + 3 = 4, + 5 = 9. 15 adds every value; 6 adds the even ones.

4. Which condition is TRUE only when Mark is from 40 to 59 inclusive?

  1. A
    Mark >= 40 AND Mark <= 59
  2. B
    Mark >= 40 OR Mark <= 59
  3. C
    Mark > 40 AND Mark < 59
  4. D
    Mark >= 40 AND Mark < 59
Show answer

Answer: A. Both limits are included, so use >= 40 AND <= 59. With OR every number passes; > and < would exclude 40 and 59.

5. The step "Calculate the average mark" is being refined. Which is the best next level of detail?

  1. A
    output the average mark to the screen for the user
  2. B
    calculate the average mark carefully and accurately
  3. C
    store all of the marks in a text file for later
  4. D
    total all the marks, then divide by the number of marks
Show answer

Answer: D. Refinement replaces a step with more precise sub-steps that together achieve it. Rewording the step does not add detail.

6. Decomposition identifies the sub-task "calculate the VAT on a price". Which kind of module fits it best?

  1. A
    a procedure with no parameters that outputs nothing
  2. B
    a global variable that every module can update
  3. C
    a constant holding the VAT for every possible price
  4. D
    a function that takes the price and returns the VAT
Show answer

Answer: D. The sub-task produces one value from an input, so a function with a price parameter that returns the VAT can be used directly in expressions.

7. Which is the most suitable identifier for a variable that stores a student's total mark?

  1. A
    TotalMark
  2. B
    x
  3. C
    Total Mark
  4. D
    1stTotal
Show answer

Answer: A. TotalMark is meaningful and valid. Identifiers cannot contain spaces or start with a digit, and x says nothing about the data.

8. Which is a benefit of using abstraction when designing a program?

  1. A
    the finished program is sure to contain no logic errors
  2. B
    the design is simpler, so the program is quicker to develop
  3. C
    every detail of the real-world system is included in it
  4. D
    the program no longer needs to be tested before release
Show answer

Answer: B. Leaving out irrelevant detail makes the model smaller and easier to design, code and understand. It does not remove the need for testing.

9. What is output by this algorithm?
Num ← 50
Steps ← 0
WHILE Num > 1 DO
   Num ← DIV(Num, 2)
   Steps ← Steps + 1
ENDWHILE
OUTPUT Steps

  1. A
    6
  2. B
    5
  3. C
    4
  4. D
    25
Show answer

Answer: B. Num goes 50 → 25 → 12 → 6 → 3 → 1, one step each time: 5 steps. When Num is 1 the condition Num > 1 is false, so the loop ends.

10. What is decomposition?

  1. A
    hiding the details that are not needed for a task
  2. B
    breaking a problem down into smaller sub-problems
  3. C
    combining several modules into one large program
  4. D
    converting a pseudocode design into program code
Show answer

Answer: B. Decomposition splits a complex problem into smaller parts that are easier to solve; each part can become a procedure or function.

Start the chapter testAbout the AS Level Computer Science test

Read the notes for this chapter

Ways to practise this chapter

Algorithm design and problem-solving: questions students ask

How many Algorithm design and problem-solving MCQs are there?

22, each with the answer and a short explanation, across 2 topics: Computational thinking skills, Algorithms. Every chapter test draws ten of them, so you can take it many times.

Is the AS Level Computer Science chapter 9 test free?

Yes. The test, the answers and the explanations are free and need no sign-up. Sign in only if you want your scores kept across devices.

How is the chapter test marked?

The moment you press Finish: your score, the right answer and an explanation for every question, and the ones you got wrong saved in My mistakes to retry.

Keep going

← Chapter 8: DatabasesChapter 10: Data types and structures →All chaptersStuck? Ask a question