Session XP: 0
Topic 1AComponent 1

Algorithms & Pseudocode

Abstraction, decomposition, trace tables, flowcharts, efficiency. Jun 2022 Q5(a)-(d) and Jun 2023 Q4 both extensively tested algorithms.

Best score
Last attempt
Best attempt progress
0
XP earned
Watch first — Craig 'n' Dave
Craig 'n' Dave · Edexcel 1CP2Computational Thinking and Algorithms
Key facts

Computational thinking

  • Abstraction — hiding or removing unnecessary detail to focus on the essential parts of a problem. Jun 2024 Q1(a): "abstraction is hiding or removing detail".
  • Decomposition — breaking a complex problem down into smaller, more manageable sub-problems. Each sub-problem can then be solved separately.
  • Algorithmic thinking — designing a step-by-step solution that can be followed to solve a problem.
  • Jun 2022 Q5(a)(iii): "abstraction". Q5(a)(iv): "decomposition".

Subprograms (functions and procedures)

  • Code written once, called many times — reusability
  • Code only has to be debugged once — easier maintenance
  • Hides implementation details — abstraction
  • Allows team development — different people work on different subprograms
  • Makes programs easier to read and understand
  • Can be shared via libraries

Flowcharts — symbols

Exam questions — 4 questions · 11 marks · from real 1CP2 past papers
1 markAbstraction definition1CP2 Jun 2024 Q1(a) style

Which of the following best defines abstraction in computational thinking?

A Breaking a problem into smaller sub-problems
B Designing an algorithm to solve a problem step by step
C Hiding or removing unnecessary detail to focus on what is essential
D Reaching a conclusion after testing a solution
2 marksSubprogram benefits1CP2 Jun 2024 Q1(b) style

Give two benefits of using subprograms (functions/procedures) in a program. (2 marks)

Hint: Give two distinct benefits. Do not say just "easier/faster" — qualify with why.
+20 XP
4 marksTrace table1CP2 Jun 2023 Q4(a) and Jun 2022 Q5(c) style

Complete the trace table for this algorithm: count = 0 reject = 0 for i = 1 to 4 weight = input() if weight < 395 OR weight > 405 then reject = reject + 1 else count = count + 1 end if next i print count, reject Inputs: 404, 393, 395, 405 Fill in: count, reject, weight after each iteration. (4 marks)

Hint: Work through each iteration. Check: is weight < 395 OR > 405? If yes: reject++. If no (395-405 inclusive): count++. Track all variables each step.
+40 XP
4 marksFlowchart1CP2 Jun 2022 Q5(d) / Jun 2023 Q4(c) style

Describe (as a list of steps) a flowchart algorithm that: takes two integers as input, and displays whether the first is greater than, equal to, or less than the second. Include all required flowchart elements. (4 marks)

Hint: Plan: Start → Input two numbers → Decision (first > second?) → if yes: print Greater → if no: Decision (first == second?) → if yes: Equal → if no: Less Than → Stop. Every diamond needs Yes/No labels.
+40 XP

Module complete! 🎉

Score loading...

+10 XP