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.
Lessons that teach it
- 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.
- AQA 8525 June 2024 Paper 1, Question 3: random.randrange, a test plan, and a syntax and a logic error 6 marks
- AQA 8525 June 2023 Paper 1, Question 16: A dice game to 21 with random numbers 11 marks
- AQA 8525 June 2022 Paper 1, Question 5: A syntax error and a logic error in a random number program 5 marks
- OCR J277 June 2023 Paper 2, Question 5(c): An adding game: three random questions and a score 6 marks
- Edexcel 1CP2 June 2025 Paper 2, Question 5: Draw lines and nine coloured circles with turtle graphics 15 marks
- Edexcel 1CP2 June 2023 Paper 2, Question 2: Fix syntax, name, index and logic errors in a program that picks random exercises 8 marks
- Edexcel 1CP2 Sample Paper 2, Question 1: Roll a dice: import random, a variable, a constant, randint and a print 7 marks
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.