AlgorithmsTopic Summary

Knowledge Organiser: Random Numbers

Part of Merge Sort · GCSE GCSE Computer Science revision

This topic summary covers Knowledge Organiser: Random Numbers within Merge Sort for GCSE Computer Science. Revise Merge 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 8 of 8 in this topic. Use this topic summary to connect the idea to the wider topic before moving on to questions and flashcards.

Topic position

Section 8 of 8

Practice

15 questions

Recall

10 flashcards

Knowledge Organiser: Random Numbers

Key Terms
  • Random number: An unpredictable value chosen from a range
  • Pseudo-random: Numbers that appear random but are generated by a mathematical formula
  • Seed: A starting value used by a random number generator; the same seed produces the same sequence
  • random(min, max): GCSE pseudocode function that returns a random integer between min and max inclusive
Must-Know Facts
  • Computers cannot generate truly random numbers — they use algorithms
  • random(1, 6) simulates a dice roll; both 1 and 6 are possible outcomes
  • random() returns integers (whole numbers), not decimals
  • Uses of random numbers: games, simulations, security, testing, art
  • The same seed value always produces the same sequence of pseudo-random numbers
Key Concepts
  • Syntax: num = random(min, max) — both endpoints are inclusive
  • Dice roll example: roll = random(1, 6)
  • Random numbers in security: used for encryption keys and password generation
  • Random numbers in games: enemy spawning, card shuffling, procedural generation
Common Mistakes
  • Saying computers generate truly random numbers: Computers use algorithms (pseudo-random number generators) — the numbers appear random but are calculated mathematically
  • Thinking both endpoints are not included: random(1, 6) can return both 1 AND 6 — the range is inclusive at both ends
  • Confusing seed and random number: The seed is the starting value for the generator; the random number is the output — the same seed always produces the same sequence
  • Expecting random() to return a decimal: The GCSE pseudocode random() function returns an integer (whole number) — it does not produce floating-point values

Revise this topic interactively on PrepWise — self-test mode, tap-to-reveal definitions, and Common Mistakes from examiners.

Try the interactive Knowledge Organiser — free →

Keep building this topic

Read this section alongside the surrounding pages in Merge Sort. That gives you the full topic sequence instead of a single isolated revision point.

Practice Questions for Merge Sort

Which design strategy does merge sort use?

  • A. Brute force — try every possible ordering
  • B. Greedy — always pick the locally best element
  • C. Divide and conquer — split the list, sort halves, then merge
  • D. Dynamic programming — store results to avoid repeated work
1 markfoundation

Describe how merge sort works. You should include what happens in both the divide and merge phases.

3 marksstandard

Quick Recall Flashcards

Is merge sort a recursive algorithm?
Yes - it calls itself on smaller sub-lists
What technique does merge sort use?
Divide and conquer - splits list in half repeatedly then merges sorted halves

15 questions on Merge Sort — practise free

Instant marking, adaptive difficulty, and 10 spaced repetition flashcards. Free until your GCSEs.

Try PrepWise Free