AQA GCSE Computer Science (8525)Specification point 3.2.9

AQA 8525 3.2.9: Random number generation in a programming language

The free BugBot lesson that teach this point, a robot to try it on, and the past-paper questions that test it.

What it covers

Games roll dice, simulations need unpredictable events, and a robot that explores a room gets stuck in corners less if it sometimes turns a random amount. Python's random library makes numbers that cannot be predicted.

  • randint
  • Other random choices
  • A robot that wanders
  • Checking your odds
  • Random, but the same every time
Read the free lesson (12 min)

Or do it in the simulator, with tasks that mark themselves

Lessons that teach it

  1. F3.7 Random numbers Strings, lists and records
    randint, choice and seeds: dice, random tunes and a robot that wanders.

Try it on a robot

The task from F3.7 Random numbers, running here. Change the program and press Run.

Past paper questions on this

Real exam questions that test this, each worked through with a program you can run.

The specification is AQA's own document; this page says which of our lessons teach point 3.2.9 and is not endorsed by the board.