This introduction covers Reusable Code Blocks within Bubble Sort for GCSE Computer Science. Revise Bubble Sort in Algorithms for GCSE Computer Science with 15 exam-style questions and 10 flashcards. This topic appears less often, but it can still be a useful differentiator on mixed-topic papers. It is section 2 of 8 in this topic. Use this introduction to connect the idea to the wider topic before moving on to questions and flashcards.
Topic position
Section 2 of 8
Practice
15 questions
Recall
10 flashcards
Reusable Code Blocks
Imagine writing instructions for making tea. Instead of writing "boil water" every time, you could say "see 'boiling water' instructions on page 5". Subprograms (functions and procedures) work the same way - write code once, use it many times by "calling" it. Functions return a value (like a vending machine giving you a drink). Procedures just do something (like pressing a button that turns on a light).